Was asked by a Python dev on my Discord three questions about learning @react_js. 1) Do I have a course? 2) Good project based examples. 3) React gotchas. Long form answer there, 🧵 here.
I have a course youtube.com/playlist?list=… It's free. Free doesn't mean bad. It just means free. The content is up-to-date and covers everything you'd need to get a job doing @react_js. It's in JavaScript.
The course does include projects, and yes it's Todo lists, hey, it works. And there are three gotchas in react; Hooks, Async and State Management.
#1 Hooks: Hooks are weird and they trip people up. Especially the dependency arrays on useEffect, useCallback and useMemo. Spend some quality time learning hooks. Here is a video specifically around hooks and dependency arrays:
#2 Async is interesting in JavaScript at any time, and in React more so. Learn async/await and promises. Make sure the projects you work on include some element of asynchronous behavior (e.g. making an API call). Timers are also a good way to learn async.
#3 State Management - React is a "view framework". Its built-in state management is primarily intended to manage view state (e.g. whether a modal is open or closed).
Any application will have business logic and business state which are probably best handled, in a React application, by using a state management library. IMHO there are four common "models" of state management and you should try one (or more) from each.
One-way data binding: Redux, Redux + Redux Toolkit, Redux + Rematch, or Zustand. I would start with Zustand and then Redux + Redux Toolkit.
Two-way data binding: MobX or Valtio. Both of these are excellent libraries and worth a go. Valtio is a touch easier to get started with.
State machine: XState. This is where you have discrete states in your UI and the library models those states and the rules that govern transitions between states. I expect XState adoption to grow a lot in 2022.
Atomic: Recoil and Jotai. This is a very cool and innovative way to model state and the dependencies between the different state "atoms". I'm a Jotai fan, but Recoil is backed by FB. Either will teach you the core concepts.
Bonus: You might also want to try a simple global state hook (react-hooks-global-state). This is kind of a half-step between state management using hooks and state management using a state manager.

Hope this all helps you on your React journey. 😁

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Jack Herrington

Jack Herrington Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(