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

Remove dependency to reach-ui #1002

Merged
merged 5 commits into from
Mar 8, 2023
Merged

Remove dependency to reach-ui #1002

merged 5 commits into from
Mar 8, 2023

Conversation

jordanoverbye
Copy link
Contributor

@jordanoverbye jordanoverbye commented Mar 8, 2023

Describe your changes

We use @reach/auto-id to autogenerate IDs to facilitate WAI-ARIA and server rendering. We can not just use useId from React as we need to provide support for React 16, 17 and 18.

Reach UI is no longer being maintained and does not fully support React 18. See reach/reach-ui#972 for more details.

In this PR, I have removed the dependency to Reach UI and the logic from @reach/auto-id has been forked and copied into the repo.

@changeset-bot
Copy link

changeset-bot bot commented Mar 8, 2023

🦋 Changeset detected

Latest commit: 41cddca

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ag.ds-next/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

PR Preview Action v1.3.0
Preview removed because the pull request was closed.
2023-03-09 00:00 UTC

@jordanoverbye jordanoverbye marked this pull request as ready for review March 8, 2023 04:35

// Workaround for https://github.com/webpack/webpack/issues/14814
// https://github.com/eps1lon/material-ui/blob/8d5f135b4d7a58253a99ab56dce4ac8de61f5dc1/packages/mui-utils/src/useId.ts#L21
const maybeReactUseId: undefined | (() => string) = (React as any)[
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have an any warning here. Is that going to annoy us going forward?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, I've just added an eslint-disable-next-line @typescript-eslint/no-explicit-any above this line

@jordanoverbye jordanoverbye merged commit 42d8d71 into main Mar 8, 2023
@jordanoverbye jordanoverbye deleted the use-id branch March 8, 2023 23:53
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

Successfully merging this pull request may close these issues.

2 participants