GuillaumeSalles / redux.NET

Redux.NET is a predictable state container for .NET apps. Inspired by https://github.com/reactjs/redux.
712 stars 86 forks source link

[Question] Any plans for state persistence? #50

Open ghost opened 7 years ago

ghost commented 7 years ago

Having used Redux on React Native I was pleased to see this library as I start to explore Xamarin.

On React Native I used the redux-persist module for managing automatic persistence and rehydration of state in my app.

Are there any plans for something similar with this library, and if not what are people doing for persisting their state when using this in Xamarin apps?

Thanks

cmeeren commented 7 years ago

I have a middleware that simply persists the few things I need. For example, when I dispatch a SignInSuccessfulAction { Token = "..." }, the action is picked up by my PersistenceMiddleware which uses the Application.Current.Properties dict and Application.Current.SavePropertiesAsync to store the token.

(It's a bit more robust/encapsulated than that in the actual app, but that's the gist of it.)