-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or request
Description
From a discussion with @mlms13
It might be handy to add some helper functions for filtering actions in the reducer that would result in a no-op/unnecessary Update.
One example is if your state is an AsyncData or AsyncResult, and it's currently in an Init state, and you dispatch an action that wants to map a function over your Complete(Ok(a)) value, but you're not in that state, it's better to return a NoUpdate rather than an Update that has no effect.
Example:
Update(AsyncResult.map(v => {...v, someChange}))
vs.
getOk >> fold(NoUpdate, v => Update(...))
There might be some handy helper functions for dealing with this to avoid unnecessary updates - it would be worth thinking about.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request