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

Consider replacing randomIds with useId #1057

Open
radekmie opened this issue Oct 22, 2021 · 3 comments
Open

Consider replacing randomIds with useId #1057

radekmie opened this issue Oct 22, 2021 · 3 comments
Assignees
Labels
Area: Core Affects the uniforms package Type: Feature New features and feature requests
Milestone

Comments

@radekmie
Copy link
Contributor

Last year, React introduced a new hook: useOpaqueIdentifier (facebook/react#17322). I wasn't that eager to implement it, but things have changed, as it gets some lifting and will be replaced by useId (reactwg/react-18#111). This could be used to replace randomIds entirely, but has a drawback - we'd have to increase the minimum React version to 18.

I'll add it to the v4.0 milestone, but it may not be implemented that soon or even at all.

@radekmie radekmie added the Type: Feature New features and feature requests label Oct 22, 2021
@radekmie radekmie added this to the v4.0 milestone Oct 22, 2021
@radekmie radekmie self-assigned this Oct 22, 2021
@radekmie
Copy link
Contributor Author

(We've had a team discussion about this issue, and here are the notes.)

We've decided to use as soon as it'll be ready. It may not be in v4 as it may happen before React 18.

@wadamek65
Copy link
Contributor

React 18 has shipped and along with it the useId. If we upgrade to React 18 in v4, we should try to use it.

@radekmie radekmie added the Area: Core Affects the uniforms package label Jun 10, 2022
@wadamek65
Copy link
Contributor

Since using useId will force us to declare a peer dependency of ^18 for React we've decided the benefits of using it are not worth it for now. We will postpone this change for another major version in the future (initially v5).

@wadamek65 wadamek65 assigned wadamek65 and unassigned radekmie Sep 8, 2022
@wadamek65 wadamek65 modified the milestones: v4.0, v5.0 Sep 8, 2022
@radekmie radekmie moved this to Concept in Open Source Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Affects the uniforms package Type: Feature New features and feature requests
Projects
Status: Concept
Development

No branches or pull requests

2 participants