Modern Front-End Development for Rails: pg 167 Acquiring Data in React with useState

Is useState a typo of useEffect? It seems like the section is much more focused on useEffect (the data is acquired using fetch inside useEffect), leading me to question if you meant to say useEffect. But maybe you’re emphasizing useState because of the switch to using Context later?

Oddly, I just fixed that in my draft like five minutes ago. Yes, you are right.

1 Like