-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
NextJS with Typescript throwing hydration error #1449
Comments
I fixed this by checking for if the window has rendered, and then rendering the video component. This fix works but I think some out of the box checks for if the window has rendered could be worth it. Code below:
|
You can simply use dynamic imports that are available as part of next.js |
Just found out ref currently is not working properly when using dynamic imports, see #1455 "next": "^12.1.5",
"react-player": "^2.10.1",
|
wow thank you! |
Very good, worked perfectly :D |
Current Behavior
Hydration error being thrown in NextJS v12.1.5 React version 18.1.0. Error goes away when replacing the React-Player element with video tag.
Error says:
Expected Behavior
Expect video element to load without throwing next hydration error.
Steps to Reproduce
Environment
Other Information
The text was updated successfully, but these errors were encountered: