We are in our fifth week, so far we have learned a lot about React, React Native components, Routing and State. It's time to think about how to manage our State. But why should I care?

State is an important part of the React World. It means, all the components I use should have state? Not, because we already saw stateless components and we saw how they are important and how we can use those. Even though, Stateless components are cool, at some point we will need to use state in our React components.

In today's episode we are going to see some good practices on how to manage our state. Tomorrow, we will see how to manage our state itself.

Let’s start with Dan Abramov, the Redux creator. Probably, you’ve heard about Redux. Redux is a tiny library to help manage state in React components.

This tweet from Dan Abramov explains one important thing:

https://twitter.com/dan_abramov/status/749710501916139520/photo/1?ref_src=twsrc%5Etfw

There are two basic premises:

The point is: you should take care of your component’s state. When we start coding in React, normally we don’t care about these things, because we just wanted to create components and plug those. Right now, it’s time to worry about these things, because you’re already know how to do simple things.

There are a bunch of tutorials on internet talking about state in React. Take your time today to read some of them at the resources section.

Resources

Franzé Jr

Software Engineer with experience working in multi-cultural teams, Franze wants to help people when he can, and he is passionate about programming and Computer Science. Founder of RemoteMeetup.com where he can meet people all over the World. When Franze is not coding, he is studying something about programming.

  1. Comments for React State

You must login to comment

You May Also Like