So, we plan to use the PHP backend with the Front React + Redux server. We are developing a very large application, many tables throughout the application. Since this will be a one-page application, all data is contained within the store object.
So, let's see if I am configured correctly. My state will start almost empty when I enter the application. When I visit the pages, my state will begin to fill up. Example. I visit the βphotosβ of the application, and then upload some photos from my database and put them in my store:
state{ ... photos: [1: {...}, 3: {...}, 17:{...}] ... }
And later, if I need a photo with id = 17, I no longer need to request it, I can use it from my store, right? Or maybe I first take it from the store and ask for an asynchronous check to see if there were changes in it.
As I visit more and more pages, I will have a huge storage object with a lot of items from different tables, for example. photos, videos, user_configurations, friends, etc. How should I work with data consistency? If I need an object that I already dialed 10 minutes ago, should I request it again? Is it great to have such a large store facility?
I plan on using normalizr and reselecting to manipulate my date inside response-redux.
Any thoughts on this? I would like to hear how you think this is a good way to handle the situation.
Thanks in advance!
Fabiu
reactjs redux react-redux normalization
Fabio baldissera
source share