Update react-redux docs for forwardRef
See original GitHub issueRe this issue: https://github.com/reduxjs/react-redux/issues/1118
After rereading the react redux docs, the reason I thought withRef
could only be used with connectAdvanced is because withRef only appears under [connectOptions]
for connectAdvanced, and not regular connect. Had I read more carefully about connect I would’ve seen that it’s a wrapper around connectAdvanced but I don’t think it’s obvious that withRef/forwardRef
can be passed to just connect as it’s not under [options]
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Forwarding Refs - React
Ref forwarding is a technique for automatically passing a ref through a component to one of its children. This is typically not necessary...
Read more >Connect | React Redux
The connect() function connects a React component to a Redux store. It provides its connected component with the pieces of the data it...
Read more >Using forwardRef in React to clean up the DOM
In this tutorial, we'll review the concept of forwarding refs in React and how it helps us manage interactions with the DOM.
Read more >Why is React.forwardRef preventing this HOC from rendering ...
I came across this behavior while working on this epic react lesson, and after re-reading the react docs on both forwardRef and HOCs...
Read more >Get Started | React Hook Form - Simple React forms validation
Installing React Hook Form only takes a single command and you're ready to roll. ... forwardRef to pass the ref too const Select...
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
A working solution with a functional component and connect :
@luigimannoni : please look at the API docs more carefully:
https://react-redux.js.org/api/connect
The signature is: