Skip to content

Action naming convention #1241

Answered by tgrapperon
davdroman asked this question in Q&A
Discussion options

You must be logged in to vote

I think it serves two different purposes. The first one is "informative", it says that an event has occurred and an action has been emitted accordingly, and you should perform relevant tasks in your reducer when you receive it, like cleaning up some state.
The second one is "imperative". The action bears an intent to do something. When you receive it in your reducer, you should perform the tasks required to realize the action.

In this specific case, this is a little tricky. The .dismiss action is emitted by the framework when the alert is dismissed by the system. This is not a request to dismiss the alert, but a signal emitted by the system that the user has finished interacting with the …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davdroman
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