Using ref-property
See original GitHub issueIn my project I’m using ref
to get the video-element, but that is no longer working as of 3.0.0
Any chance of making it work again, or to make an alternative way to get the VideoElement-node?
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Refs and the DOM - React
Refs are created using React.createRef() and attached to React elements via the ref attribute. Refs are commonly assigned to an instance property when...
Read more >A complete guide to React refs - LogRocket Blog
Learn how to use React refs, and why it's important to use them only when React can't handle a function call through its...
Read more >Working with refs in React | CSS-Tricks
createRef () is a new API that shipped with React 16.3. You can create a ref by calling React.createRef() and attaching a React...
Read more >How to Use React Refs - Ross Bulat - Medium
Refs are created using React.createRef() , and are assigned to class properties. In the above example the ref is named myRef , which...
Read more >Refs in React js - Topcoder
To add ref to a DOM element we need to pass the ref attribute and in this case, the 'current' property will be...
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 Free
Top 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
@mnervik I didn’t use
React.Component
, but I think this is similar to what you are looking for and it works on my end:Note: I just added the types so they are not available yet.
@mnervik I think I’ve got a fix for it. Try it out by changing your
package.json
to:then run
npm update
oryarn upgrade
(I think)Let me know if it works.