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
feat(factories): dispatchOnMount() now expects factories which are invoked with props, fixes#3
BREAKING CHANGE: Previously, dispatchOnMount() expected you to pass actions/thunkservables directly, but often you want access to props which would otherwise not be possible. Now, you MUST always provide a factory; if your action doesn't require arguments, you can simply pass the action factory directory.
```diff
// actions without needing props
- @dispatchOnMount(fetchUser())
+ @dispatchOnMount(fetchUser)
// actions that need props
- @dispatchOnMount(fetchUserById(UNKNOWN)) // BROKEN
+ @dispatchOnMount(props => fetchUserById(props.user.id))
```
0 commit comments