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
But problem this time is if both itemActions and authActions have a reset action they will collide.
So to solve these two, would it be an idea to implement some kind of prop namespacing? Without discussing the implementation, wouldn't it be an idea to have the itemActions in the example accessible via this.props.itemActions.actionName instead of this.props.actionName.
Would there be any cons with above aproach?
The text was updated successfully, but these errors were encountered:
The trick here is that it becomes difficult to memoize mapActionsToProps when it contains nested objects. Maybe something like the select() function that powers mapStateToProps could work here?
Hello,
When using actions I see two problems.
Sure, we could combine those two and merge into one object by borrowing the excellent
combineActions
fromredux-zero
https://github.com/redux-zero/redux-zero/blob/3d0b032c0f3c94757e307673d46e9c52327f3b75/src/utils/combineActions.ts
But problem this time is if both
itemActions
andauthActions
have areset
action they will collide.So to solve these two, would it be an idea to implement some kind of prop namespacing? Without discussing the implementation, wouldn't it be an idea to have the itemActions in the example accessible via
this.props.itemActions.actionName
instead ofthis.props.actionName
.Would there be any cons with above aproach?
The text was updated successfully, but these errors were encountered: