Where should I put my state React?

There should be a single “source of truth” for any data that changes in a React application. Usually, the state is first added to the component that needs it for rendering . Then, if other components also need it, you can lift it up to their closest common ancestor.

Sizin İçin Seçtik  How do I get the Harmony One MetaMask?

Leave a Reply

Your email address will not be published. Required fields are marked *