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

[v5] Inline mini-create-react-context dependency #9382

Merged
merged 1 commit into from
Oct 2, 2022

Conversation

chaance
Copy link
Collaborator

@chaance chaance commented Sep 30, 2022

This PR inlines the mini-create-react-context dependency, a polyfill for older versions of React that is no longer maintained. This should have no meaningful impact, but it will remove a needless peer dependency version warning for users on React 18.

It could potentially (slightly) increase the bundle size for legacy users where the dependency is already bundled, but it shouldn't be significant enough to ease the concern for users on React 18+ IMO.

@xr0master
Copy link

Thank you very much for fixing the warning about a possible incompatibility!

May I ask a question, why not remove this polyfill at all? I understand that these are break changes, and it seems like the major version needs to be changed, but in fact, the context API is over 4 years old and someone using an older version of React will not update the router library either.

@chaance
Copy link
Collaborator Author

chaance commented Oct 2, 2022

May I ask a question, why not remove this polyfill at all? I understand that these are break changes, and it seems like the major version needs to be changed, but in fact, the context API is over 4 years old and someone using an older version of React will not update the router library either.

React Router has millions of users. We cannot assume anything about their apps or what will/won't break their apps should they decide to update to a new patch release.

@chaance chaance merged commit 3a06a4f into v5 Oct 2, 2022
@chaance chaance deleted the inline-mini-create-react-context branch October 2, 2022 16:55
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.

3 participants