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
Any thoughts on allowing an optional param to be passed to react-resolver to specify when it should actually resolve? I have a situation where just checking whether or not props has a certain key isn't enough and it'd really come in handy to be able to have some custom logic there.
Thanks!
The text was updated successfully, but these errors were encountered:
Hah! It sounds like #84 may help. The resolver will bypass any prop that already exists (since it doesn't need resolving).
Can you provide an example?
What I wanted to do in the past was actually having the resolver look at React.PropTypes.foo and checking for the isRequired. If it's required, it always resolves. If it's optional, it would not.
I use reselect along with redux, and the issue I'm having is the props returned from reselect/redux may have the key for the object I'm trying to load, but the value of it may be something like an empty object, or null, etc. which means react-resolver won't try to load anything... right? So I'd like to be able to specify a custom function to run to determine if something should be loaded or not, ie: obj.length == 0, etc and not just whether or not the key exists in props.
Any thoughts on allowing an optional param to be passed to react-resolver to specify when it should actually resolve? I have a situation where just checking whether or not props has a certain key isn't enough and it'd really come in handy to be able to have some custom logic there.
Thanks!
The text was updated successfully, but these errors were encountered: