Modern State Management in React
Advanced: Modern State Management in React
The new React Hooks make it possible to have state management in function components. Thus, there is lots of stuff to cover about the new Hooks:
It's possible to build entire applications (part 1) only with these React Hooks which almost mimic Redux (part 2). It just takes a helper library to combine all reducers for a global state yourself. However, as for now, the new Hooks cannot replace (yet) Redux.
If you haven't learned about React Hooks or modern state management in React yet, go through these tutorials and get up to speed with the latest changes in React.
Bonus: Beginners often ask me about lifting state in React. That's why I wrote a short tutorial about lifting state down and up.
Beginners: List Components in React
I always find it empowering to show developers new to React how to create a list component in React. It shows the power of JavaScript in React's JSX syntax by just using the array's map method. Often there are questions asked about the key attribute, so I covered it in a tutorial too.
If you want to take it one step further than just a simple list component, why not implement a list where it's possible to scroll to various items with a user interaction?
Bonus: Not necessarily related to list components, but a fundamental gotcha in React event handling: Why do we have to use preventDefault?
That's it from my side for this month with the latest updates for React and the JavaScript ecosystem. Let me know what you want to learn about next and I try to cover it in one of my tutorials. Up until then, I wish you a good time.
Cheers, Robin
PS.: If you have a few spare minutes and read one of my books, it would mean the world to me if you would leave a nice review for one of them.
Monthly Pick
I just finished the 2. season of the German show called Dark and I cannot wait for its final season. It's one of these shows where the makers thought the story through from the beginning up until the very end. The timelines and family constellations are just perfectly planned out. If you start watching it, I would recommend watching it in German with English subtitles as it captures the atmosphere so well.