My Account
Sign up, and you can customize which countdowns you see.
Sign up
Report problem with this ad
Start a related thread
Start a related poll
Reply via Boardmail
Oct 2, 2022
3:31
:33
pm
Hypnotoad
All-American
The value of the input is stored in state on change. He's using that state when
a callback passed in on props is called in handlesubmit. We're missing context as we don't know what the parent component looks like.
This message has been modified
Originally posted on Oct 2, 2022 at 3:31:33pm
Message modified by Hypnotoad on Oct 2, 2022 at 3:31:55pm
Start a related thread
Start a related poll
Reply via Boardmail
Report problem with this ad
Hypnotoad
Previous username
hessrp
Bio page
Hypnotoad
Joined
Jun 24, 2013
Last login
May 3, 2024
Total posts
47,646 (2,012 FO)
Report problem with this ad
Messages
Author
Time
React.js question?
Icelandic Cougar
10/2/22 3:15pm
This is so hard to read without formatting. Can you changed to preformatted in the CB editor?
zsmooth
10/2/22 3:20pm
Updated. Let me know if that's easier.
Icelandic Cougar
10/2/22 3:23pm
Looks like you are never actually changing the todo array state
Hypnotoad
10/2/22 3:24pm
Also, I don't see you mapping over the array in the JSX
Hypnotoad
10/2/22 3:25pm
Looks like this is just the form, not the list.
zsmooth
10/2/22 3:25pm
Yeah. But they means he's not sharing the parent component, which we would need
Hypnotoad
10/2/22 3:28pm
RE: Yeah. But they means he's not sharing the parent component, which we would need
zsmooth
10/2/22 3:36pm
I can see some syntax errors.
Brooklyn
10/2/22 3:25pm
RE: React.js question?
zsmooth
10/2/22 3:25pm
The value of the input is stored in state on change. He's using that state when
Hypnotoad
10/2/22 3:31pm
Part of the problem might be my list. It's very basic. Here it is as of now.
Icelandic Cougar
10/2/22 3:33pm
That component is purely passthrough. It does nothing but return TODO. Your
Hypnotoad
10/2/22 3:37pm
I feel like I'm close, but obviously still missing something. Brain is mush.
Icelandic Cougar
10/2/22 4:16pm
Look closer - it's not. He logs it on onSubmit, but he doesn't pass it up.
zsmooth
10/2/22 3:33pm
You're right. input is assigned but never read. Overall, this component can be
Hypnotoad
10/2/22 3:40pm
Try this
zsmooth
10/2/22 3:32pm
Report problem with this ad
Posting on CougarBoard
In order to post, you will need to either
sign up
or
log in
.
Report problem with this ad