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

Error in console when using wrapper #1476

Closed
rhythmbhiwani opened this issue Jul 14, 2022 · 1 comment
Closed

Error in console when using wrapper #1476

rhythmbhiwani opened this issue Jul 14, 2022 · 1 comment

Comments

@rhythmbhiwani
Copy link

Be sure to search for your issue before opening a new one.

Current Behavior

I'm using next js 12.2.0 with tailwind css. This is the code

<ReactPlayer
                wrapper={({ children }) => (
                  <div className="aspect-h-9 aspect-w-16 col-span-12 overflow-hidden isolate rounded-xl md:col-span-6">
                    {children}
                  </div>
                )}
                width="100%"
                height="100%"
                controls={true}
                url={bannerYouTubePlaylist.link}
/>

This is the error I get in console

Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of `ReactPlayer`.
    at wrapper (webpack-internal:///./pages/youtube.tsx:137:66)

Expected Behavior

I'm not planning to use any refs, so how can this error be removed and what it meant.

Environment

Other Information

@cookpete
Copy link
Owner

Published in 2.11.0. Sorry for the delay.

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

No branches or pull requests

2 participants