My school, Flatiron, only taught Class components. If I had to choose which I prefer, it’s definitely hooks. But I think I’m glad that I learned Class structure, and teaching myself hooks has been relatively straightforward. I’m actually writing a series of posts on a few different hooks: useState and useEffect are already posted! I’ll try to get useRef up tomorrow. But I think making the switch is overall a great choice. I think the industry as a whole is moving towards them and I think they’re easier to learn. My next challenge is learning how to create custom React hooks!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
My school, Flatiron, only taught Class components. If I had to choose which I prefer, it’s definitely hooks. But I think I’m glad that I learned Class structure, and teaching myself hooks has been relatively straightforward. I’m actually writing a series of posts on a few different hooks: useState and useEffect are already posted! I’ll try to get useRef up tomorrow. But I think making the switch is overall a great choice. I think the industry as a whole is moving towards them and I think they’re easier to learn. My next challenge is learning how to create custom React hooks!