The Render it will happens first ,The methods in this section cover the vast majority of use cases you’ll encounter creating React components , as in lifecycle diagram.
static getDerivedStateFromProps() The static getDerivedStateFromProps is the first React lifecycle method to be invoked during the updating phase.
These methods are called in the following order from fast to less one in lifecycle events :
React Updates().
constructor().
render().
componentWillUnmount().
componentDidMount().
In a React component, props are variables passed to it by its parent component. State on the other hand is still variables, but directly initialized and managed by the component , the state can be initialized by props.
React components automatically re-render whenever there is a change in their state or props. A simple update of the state, from anywhere in the code, causes all the User Interface (UI) elements to be re-rendered automatically.
It is highly recommended that you only put plain serializable objects, arrays, and primitives into your store. It’s technically possible to insert non-serializable items into the store, but doing so can break the ability to persist and rehydrate the contents of a store, as well as interfere with time-travel debugging. When React was first introduced, we were presented with local state. The important thing to know about local state is that when a state value changes, it triggers a re-render.
##these some examples and recommend about what we do when we store some things