Handling state

In the previous section, we saw the usage of state for the regions; let's delve a bit deeper into that. The concept of state is very similar to props, but with crucial differences: props are assigned from the outside and are read-only, and state is handled privately, and read-write. If a component needs to keep some information, which it can use to render itself, then using state is the solution.

..................Content has been hidden....................

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