3 ms·
My thoughts given that outline would be: - Redux with a middleware that saves the whole state to localstorage automatically - Some simple background timer stu
by crooked-v 8y ago
My thoughts given that outline would be:
- Redux with a middleware that saves the whole state to localstorage automatically
- Some simple background timer stuff that uses ononline and onoffline events to know when to poll for updates, then dumps the JSON contents from the polling into the Redux store
- Some React components that act as one-way output of the stuff in the Redux store, optionally with a basic routing lib if some menus/navigation are necessary
Then stick some Progresssive Web App stuff in there so the whole bundle can work offline entirely from browser cache.
- AnIdiotOnTheNet 8y ago> Redux with a middleware that saves the whole state to localstorage automatically I don't want to save the whole state automatically. The state isn't complicated. Even the data isn't complicated. > Some React components that act as one-way output of the stuff in the Redux store, optionally with a basic routing lib if some menus/navigation are necessary Or I just write some javascript that creates a view of based on the data it has cached locally and updates that view when the user interacts with it. This is what we're talking about. I have a relatively simple problem, I don't need to pull in additional dependencies in the form of a framework that's just going to make things more complicated and require me to learn its paradigms.
- crooked-v 8y ago> I don't want to save the whole state automatically. The state isn't complicated. Even the data isn't complicated. If you don't want to save the state, why mention localstorage in the first place? The point of using the Redux thing would be to automate that process, so that you don't have to manually save/retrieve anything to localstorage yourself.