You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the StoreConnector it looks to me like all of the view models properties must be derived from the current store data. But what if I want to have some data that should be kept local to the view. Let's say I want to e.g. show an alert once based on an exception that is part of the redux state. For this, I would have a property like showedExceptionAlert in the view model. But whenever the view model gets regenerated the value of this property would get overridden. And I don't want to go the full redux way via actions, reducer... just because of a simple, local-only property.
For sure I could keep this data in the view, but that feels a little bit wrong to have two places to look for the current state.
Another option would be to mix e.g. the bloc pattern with redux but this also seems a little bit too much for such a simple task.
So the question is: Is there something like a pattern to have local and global (redux) state in one view model?
The text was updated successfully, but these errors were encountered:
Using the
StoreConnector
it looks to me like all of the view models properties must be derived from the current store data. But what if I want to have some data that should be kept local to the view. Let's say I want to e.g. show an alert once based on an exception that is part of the redux state. For this, I would have a property likeshowedExceptionAlert
in the view model. But whenever the view model gets regenerated the value of this property would get overridden. And I don't want to go the full redux way via actions, reducer... just because of a simple, local-only property.For sure I could keep this data in the view, but that feels a little bit wrong to have two places to look for the current state.
Another option would be to mix e.g. the bloc pattern with redux but this also seems a little bit too much for such a simple task.
So the question is: Is there something like a pattern to have local and global (redux) state in one view model?
The text was updated successfully, but these errors were encountered: