Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve useRef documentation to avoid re-creating ref contents and null checks #7055

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PrittoRuban
Copy link

Introduced a more robust solution using useState for stable reference initialization.

This approach has several advantages:

  1. It avoids re-creating the video player instance on every render.
  2. It provides a stable reference that does not change across renders.

#7041

It avoids re-creating the video player instance on every render.
Copy link

vercel bot commented Jul 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
19-react-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2024 8:39pm
react-dev ✅ Ready (Inspect) Visit Preview Jul 11, 2024 8:39pm

Copy link

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants