Skip to content

[BUG] Build warnings related to 'useId'. #906

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

Closed
maosin77 opened this issue Jan 18, 2023 · 2 comments · Fixed by #911
Closed

[BUG] Build warnings related to 'useId'. #906

maosin77 opened this issue Jan 18, 2023 · 2 comments · Fixed by #911
Labels
Bug Dependencies Pull requests that update a dependency file

Comments

@maosin77
Copy link

maosin77 commented Jan 18, 2023

Hi, thanks for the good work your library is doing a great job. However, I have a problem.

Describe the bug
I get a warning during the build.

./node_modules/react-tooltip/dist/react-tooltip.esm.min.js
Attempted import error: 'useId' is not exported from 'react' (imported as 'n').

Version of Package
5.5.1

Context
In my project we are using react 17.x.
useId which you are using was introduced in react 18.
I believe it is cause of the issue.
Is there any change to use eg. uuid instead of useId?

Of course, I understand the decision to use the latest react features. However, I believe that the process of migrating to the latest versions will continue for some time in existing projects. So I think that backwards compatibility will be a great value.

please see my PR: #907

@maosin77 maosin77 added the Bug label Jan 18, 2023
@gabrieljablonski gabrieljablonski linked a pull request Jan 18, 2023 that will close this issue
@gabrieljablonski gabrieljablonski added Dependencies Pull requests that update a dependency file Bug and removed Bug labels Jan 18, 2023
@gabrieljablonski
Copy link
Member

gabrieljablonski commented Jan 18, 2023

Thanks for reporting this.

As noted by my comment, an unique id is not necessary for the provider to work properly.
#911 addresses this.

@maosin77
Copy link
Author

Cool! Thanks for quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dependencies Pull requests that update a dependency file
Projects
None yet
2 participants