Skip to content

How to unconditionally emit certain properties regardless of Diff #1419

Answered by mbrandonw
PangMo5 asked this question in Q&A
Discussion options

You must be logged in to vote

Otherwise, the state must be set back to nil at the time of the dismiss or after receiving the value from the ViewController, which seems strange.

I'm glad you are able to recreate this concept outside the library because I'm not sure it should ship with library. In our opinion, forcing the state to reset to nil on dismissal is a good thing, and will make your domain modeling stronger if you can maintain that consistency.

The alertMessage state should be optional so that nil represents no alert and non-nil represents an alert showing. This allows you to have logic in your reducer that is dependent on whether or not the alert is showing. Otherwise you have no way of knowing.

In the examp…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@PangMo5
Comment options

Answer selected by PangMo5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants