External libraries

First of all, it is important to understand why we should consider using the state inside our components, and why it can help us in different ways.

Most of the tutorials or boilerplates for React already include external libraries to manage the state of the application, such as Redux or MobX.

This leads to a common misconception that you cannot write a stateful application using React only, which is far from the truth.

The direct consequence is that many developers try to learn React and Redux together, so they never find out how to use the React state correctly.

This section is our opportunity to make it clear how we can use the state in the right way and understand why, in some cases, we do not need any external libraries.

Since the version 16.3.0, React introduced a new Context API that is more efficient and supports both static type checking and deep updates. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.6.194