DEV Community

What were your "gotchas" when first learning React?

Joshua Nelson ✨ on November 25, 2018

I've found there are some common stumbling blocks that people have when they're learning React, and sometimes there's an "Aha!" moment when they un...
Collapse
 
juanfrank77 profile image
Juan F Gonzalez

I think the one thing so far that has been my most "Aha!" moment is the difference and usage of functional components vs class components. There's a lot writing out there that doesn't explain too much the nuances of it, but it all clicked when I read a post of Tyler McGinnis.

Collapse
 
juniusfree1 profile image
juniusfree

I'm currently building my first react app, a guess the number game. I'm not yet able to finish it because of the following:

  1. setState is asynchronous. I don't know how to use the states after the components update to update another state without going into the loop
  2. Using forms in react
  3. Handling events

These are the basic issues that I'm working on. I'm a newbie in webdev in general.

Collapse
 
kayis profile image
K

Your first two points where the reason I wrote React from Zero.

React got major popularity when ES2015 came out, so people didn't know what of all the new syntax was React specific.

github.com/kay-is/react-from-zero

Collapse
 
niorad profile image
Antonio Radovcic

Now that I think of it, it was probably the fact that React is really "just" the view. I was like "that's it?".
I did a little AngularJS before that, which is a bit more complex.

Collapse
 
simoroshka profile image
Anna Simoroshka

Data flow, data fetching, asynchronous state updates, some of lifecycle methods, routing.