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

fix(react): fallback to React 18 internals for getting component names #139

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

bowheart
Copy link
Collaborator

@bowheart bowheart commented Dec 11, 2024

Description

In reviewing the current state of the v1.x branch preparatory to publishing a new v1 minor version, I determined that the useReactComponentId hook is too optimistically assuming it'll be used in React 19. While this doesn't break anything when used with React 18, it does mean poorer dev X since components will add generic ids to the atom graph. Zedux v1 is supposed to be completely compatible with React 18, so I think it should still support this dev X.

To be clear, v2 will work with React 18 as well, but with some caveats. The dev X of seeing the component name that added a graph dependency in Zedux is not something that React itself officially supports. So I'm fine with this change being omitted in v2. When upgrading to Zedux v2, we'll recommend to also upgrade to React 19 to get this dev X back.

@bowheart bowheart merged commit 3d9d6f7 into v1.x Dec 11, 2024
2 checks passed
@bowheart bowheart deleted the josh/react-18-internals-support branch December 11, 2024 21:12
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.

1 participant