What is considered "Too much data" in react state What is considered "Too much data" in react state reactjs reactjs

What is considered "Too much data" in react state


For the most part, it does not matter Where you store this data as much as how much of data you are storing. All of the data that you store, regardless of whether in a store or in a static variable, is stored in RAM. Because of this, your application might crash the browser because of taking too much resources.

A much better solution for storage (If you absolutely have to store data client-side) is to use something called IndexedDB. IndexedDB stores data in your hard disk instead of RAM

In most use-cases however, it is recommended to store the data in the backend, paginate it, and then send only the individual pages to the client as needed. This ensures that

  • The client doesn't have to load a massive chunk of data before the application works.

  • The client does not have to store large amounts of data in RAM.