When you work with a React app, it normally needs some data from the server to store for immediate use (e.g. show it on the page). If the app works with some complex relational database the work, then, may be a bit challenging. In this article, I am going to describe some typical issues teams face when organizing data, which we faced during our work on one of DashBouquet’s projects. I will also discuss our solutions.
To make it easier, we will have a look at an example. Let’s think of an app with multiple pages, where each page needs a certain amount of data from the server. In some cases, the amount of data would be too massive to be fetched all at once while loading the app. So the data is requested for every page load. And for every page, we most probably have a partition where we can save page-related data, so it would be a good idea to put our fetched data there, too.