With the new PWA functionality for Angular it's quite simple to make your app work offline via a service worker. My question is how to leverage NGRX to cache ones state, so that it is available offline.
I'm also concerned, that the client might modify the state when it's cached in the browser. (e.g. when using ngrx-store-localstorage
)
You are right, a library such as ngrx-store-localstorage
is the solution, there's no magic behind.
The concern about modifying the state isn't your problem. If someone wants to abuse the frontend of your app / website - he / she can do that. The main goal here is to assure that your backend doesn't accept malformed data (never trust data you receive from a user) and you don't store sensitive data in the frontend's store.
Anybody can open developers tools on this page and modify your question - up to them, because it is their local copy and it doesn't mean something is wrong with stackoverflow.