I’m following your React course that I purchased, but there is a problem.
- In the Components section,
- In #8 Updating the State,
- You said to put ‘counter’ in the value
I did that in my code, but I get an error that ‘value’ is undefined.
How do I debug this?
The next section builds on this part, so I cannot move forward.
Here is the error, as shown in my Chrome browser:
the value should be initialized to 0 (zero)
check it here
Setting the value to 0 (zero) does work, but the tutorial video was showing how to pass the counter in the props.
My first post here showed 3 circles to show 1. What Section, 2. What Chapter, and 3. The Code from the video. Those are all from a screenshot of the video at time 4.29.
Is the video incorrect?
You can compare with a version I did.
I do not remember the code being wrong in that part.
However I might have used different names than in the course but it should be self explanatory.
try to understand the concept single source of truth