June 2021
Intermediate to advanced
398 pages
9h 35m
English
At this point, React has taken over part of our page and is drawing the seats, which is nice enough, but we’d like it to, you know, react to something. We’d like to have a little interactivity.
In React, you can use JSX to specify event handlers on React elements in much the same way you would when writing old-school JavaScript embedded in HTML. The problem is how to make changes to our components as a result of those events. As mentioned, the props we pass into each component are immutable, which means if we want to change something about a component, we can’t use props. React uses the term state to refer to the parts of a component that change and trigger an update to how the component is displayed when they ...