Things To Learn Before Redux

With React’s new context API you can go a long way with a plain old react app before things become tedious. I encourage you to learn how to use the new context API before you reach for redux.

I also have tremendous respect for component setState. Learn how to use it before you start with redux. Did you know setState takes a callback? Did you know you can pass setState an updater function? Did you know that you can declare state changes outside of a component?

Using Redux before you understand how to use higher order components can also be a little confusing. Before you start using redux understand higher order components well enough to know when it’s better to use a render prop.

If you’re comfortable with context, you’ve mastered setState batching and you know what a prop-namespace-clash is, and you are still finding you app hard to manage then you are going to love redux.

Redux doesn’t just give you access to any piece of state anywhere in your app, it also pushes you to rely on pure functions. This makes things a lot easier to test, and gets everyone on a team using the same approach.

Human Redux by Henrik Joreteg is the single the best book I have read on learning redux. Well worth the money. If you can’t afford it then google ‘Learn Redux with Dan Abramov’ for one of the best free resources for learning redux on the web.

Links:

 
1
Kudos
 
1
Kudos

Now read this

The Best People in Data Visualisation Today

I went to a talk by David McCandless about his work visualising data. After the talk, my wife picked up a signed copy of his new book “Knowledge is Beautiful”. I asked him who the best people in data visualisation are today. I asked him... Continue →