is it possible to get a ref to the created component?
See original GitHub issueHi, if I specify component="div"
is it possible to get a ref to that div?
The current ref returned is the React Class Component, not the div…not sure why?
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
How to use React createRef - LogRocket Blog
Learn how to use the React.createRef() method and useRef Hook in React to simplify creating refs and interact with the HTML DOM.
Read more >How can you create Refs after the component has mounted in ...
But now my question is how do I create the refs ? My declaration for React.createRef() is in the Constructor(){} for the first...
Read more >Refs to Components | React
React supports a special attribute that you can attach to any component. The ref attribute can be a callback function, and this callback...
Read more >All about React's createRef method - OpenReplay Blog
“Ref” is short for reference, and it's a React feature that allows us to store a component or DOM element of our application...
Read more >Use React ref to Get a Reference to Specific Components
When you are using React components you need to be able to access specific references to individual component instances.
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
Ok solved, that works with it :
Thanks a lot @mattcolman ! Doesn’t work for me, it doesn’t return the DOM element but the React Class of
Tappable
as ref, here’s my code :