DEV Community

What's the hardest thing about learning React JS?

Learning React can have it's ups and downs especially when you are learning it by yourself.

Great react questions and discussions

This week I came across these resources that I found useful in breaking down the hard parts of React.

I would love to hear:

1) what you found hard or confusing at first when you started learning React?

2) How you solved it.

Top comments (23)

Collapse
 
jimcmorrison profile image
JimCMorrison

I really struggled with State Management early on when working with React. However the more time I spent working with the React library, the more I got comfortable with it. Also the three separate course I took on it really hammered it home!

Collapse
 
hassanzreik profile image
Hassan Zreik

Hi Jim, can you add the courses you took please

Collapse
 
jimcmorrison profile image
JimCMorrison

No problem, ReactForBeginners.com and LearnRedux.com along with a scattered amount of React tutorials on Youtube.

Thread Thread
 
tracycss profile image
Jane Tracy ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿ’ป

Great resources. Will check them out too.

Thread Thread
 
hassanzreik profile image
Hassan Zreik • Edited

Thank you @jimcmorrison

Collapse
 
glyphcat profile image
GlyphCat • Edited

Passing props. I did not know how to write my components so that it can read "foo" from foo. Turns out it was done through the children prop.

Then there were also problems known as prop drilling. I managed to solve it after learning Redux and Recoil.

I didn't really do anything. I just kept on discover/learn how to use different npm packages and libraries. As I read the examples, a lot of doubts were cleared for me. I think examples are very important.

Apart from that, I think warning messages and errors are also important, I knew nothing about ARIA or cleanup functions or issues with target="_blank" before I learned React.

Collapse
 
tracycss profile image
Jane Tracy ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿ’ป

The learning curve for React has a lot of ups and downs. I have found out so far that been patient with myself as I learn is also important.
I totally agree with you, Edwin. Practice, practice, practice is the way to get better and increase your knowledge. Haha, got some errors when I changed my app structure and files. But errors are great to show you where you went wrong.
All the best as you continue on your journey. โœจโœ”

Collapse
 
anotherfathead profile image
anotherfathead
  1. Definitely State Management. Figuring out how to correctly notify components when a state change occurred and update accordingly.

  2. Still working on it by practicing, reading blog posts, questions in discord channels, etc.

Collapse
 
drewclem profile image
Drew Clements
  1. State management without a library was pretty tough for me. It took a while for me to grasp the concept that the state only existed in the instance it was used, so refreshing or navigating to a new page lost or reset the state. I spent a bit trying to use it as an on the fly database before realizing its limitations.

  2. There was never really a solve as much as there was gaining an understanding of it. Learning more about props helped too. With props you can take the state of one component, pass it to another- and now that state persists into the next area you need it to continue working.

This is all a very simplistic breakdown of everything so take the "explanations" with a grain of salt.

Collapse
 
raeadvent profile image
Raeneldis

The Flexibility of react.
You can use any pattern as you like (unlike vue or angular which is framework). It can make you lost in your own source code.

My solution : based on your coding habbit, start designing on your folder structure to separate logic and presentation, then continue to solidify your pattern down to the most detail when using react, then you should be good.

Collapse
 
sebaaismail profile image
S.Ismail

Good point bro.

Collapse
 
prashanthwagle profile image
Prashanth P Wagle

Redux, Hands down!

Collapse
 
tracycss profile image
Jane Tracy ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿ’ป

I haven't reached there yet, still learning about states. But I know with practice you will get it, Prashanth. โœจ

Collapse
 
jessecalton profile image
Jesse Calton
  1. Mostly the syntax and how lifecycle hooks work.

  2. Practice, practice, practice. Watching code-along videos, doing my own simple apps.

Collapse
 
tracycss profile image
Jane Tracy ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿ’ป

That's great. The syntax can be confusing at first but when you practice it a lot. It becomes automatic as you code.
Thanks, Jesse. ๐ŸŒŸ

Collapse
 
scrabill profile image
Shannon Crabill

It was a whilte before state and props made sense.

And the parent/child relationship between component took some getting used too.

Now that I'm a little more experience, the build/deploy aspect of React is what I'd like to better understand.

Collapse
 
ljcdev profile image
ljc-dev

1 The hardest part was all the tutorials start with class components and before hooks - which is normal because hooks appeared later. But just saying ๐Ÿ˜.
2 So I learnt the bare minimum with class components and jumped on hooks without learning componentDidMount, binding, etc ๐Ÿ˜‡.

Collapse
 
slimdestro profile image
D\sTro

If you just got started trust me you'll be totally confused why sometimes "props" and sometimes "states" ๐Ÿ˜€ but this is not the tough part. It just a "confusing" part of react. Toughness starts when you deploy a central repo for state management either redux or context API or any other tool.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.