how to get ownProps?
See original GitHub issue<Provider store={store}>
<Counter color="blue" />
</Provider>
if i pass a prop color=āblueā to the connected component itās not accessible inside Counter component as a prop. Only props that you return from mapToProps function are passed as constructor props. Redux passes properties as ownProps as the second argument of mapToProps function.
Is it missing from redux-zero or am i doing something wrong ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Connect: Extracting Data with mapStateToProps - React Redux
With (state, ownProps) , it runs any time the store state is different and ALSO whenever the wrapper props have changed. This means...
Read more >How can I get ownProps using reselect on redux?
You can do this by connecting the selector to a component using the connect method provided by react-redux, then passing the component propsĀ ......
Read more >How to access props in mapDispatchToProps - Emma Goto
Accessing ownProps in mapDispatchFromProps. We can also access ownProps from mapDispatchToProps . Here we have the same Button example, butĀ ...
Read more >Unused ownProps parameter of the React Redux ... - DeepScan
Navigate through detailed description of DeepScan rule.
Read more >Connect | React Redux
This also determines whether the function will receive ownProps. See notes here. state #. If your mapStateToProps function is declared as taking one...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
just tried to recreate it on a sandbox and it works, so probably itās the late hours to blame.
Would be good to have the API documented somewhere, because i only found this searching through redux documentation. Itās not even in the examples.
thanks for redux-zero, i love the simplicity
thanks for double checking and fixing š