I have been reading up on Redux, and it solves a great number of problems. But in essence it is simply a central 'true' storage.
Intuitively though I find the fact that the state is still passed through props or context inelegant.
Aside from disk i/o speeds, why not use the local cookie store as a central data store? This would eliminate the need for passing the data along through components.
The only challenges I see is data safety, but that is not an issue for all applications.
Elaborating based on Dave's comments. My actual question is more about the possibility of having a central Redux style store without needing to actively pass along the state through props or context. Cookies seemed like an interesting first avenue to explore.
Fast forward a few years of experience:
- The point of redux is immutable data flow, cookies are more like a global variable
- You could use the cookie store or local storage API to store data (see
react-redux-persist
) but you wouldn't rely on it performance wise - We have no control over cookie handling (the browser decides that) so relying on it is a bad idea for compatibility