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 understand.
- The difference between ES2015, React, JSX
- Complex usage of libraries like underscore or lodash in example code
- Understanding the overall "data flow" of React (And, the "Flux" architecture as a concept)
- Shared (but different!) concepts in other frameworks like Angular, Vue or even jQuery
- The asynchronous nature of some operations (like
setState
)
Was there anything particularly tricky to get a handle on when you were learning React? What was your "Aha!" moment?
Top comments (5)
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.
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:
These are the basic issues that I'm working on. I'm a newbie in webdev in general.
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
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.
Data flow, data fetching, asynchronous state updates, some of lifecycle methods, routing.