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
In the example it looks like by suppling a 2nd arg you're changing the signature used to identify the action in the handler registration later. So you can write { foo: true } instead of UserConstants.DELETE_USER.
Is that what's going on and if so, what's the purpose of it?
The text was updated successfully, but these errors were encountered:
Hey, good question. The docs need some improvement here which I will look into. In the meantime:
The second argument is the action creator attributes which you can query using an action predicate. These attributes are useful when you want to listen to actions based on something other than their type e.g. if you wanted to listen to all actions that came from the server, you'd pass in { server: true } as the second argument to the creator and { server: true } as the action predicate.
In terms of the rules. What would happen if you queried using more advanced structures? For example, would {server:true, notification:true} pick up events defined as {server:true} as well as {notification:true}?
http://martyjs.org/guides/constants/index.html contains the following code snippet regarding the second argument to Constants functions:
In the example it looks like by suppling a 2nd arg you're changing the signature used to identify the action in the handler registration later. So you can write
{ foo: true }
instead ofUserConstants.DELETE_USER
.Is that what's going on and if so, what's the purpose of it?
The text was updated successfully, but these errors were encountered: