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: resolve react and react-dom dependency conflicts #30

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

Limegrass
Copy link
Contributor

The specification of react and react-dom @18 causes npm to pull a version of react at that version within the package directory. This causes a runtime issue if this is not the version of react that is actually used by consumers when they attempt to serve those dependencies without the version matching. peerDependencies suggests that this package should be compatible with react and react-dom @17 as well, so the expectation is that consumers can use v17 of those dependencies.

peerDependencies already specify react and react-dom @17/@18, so the necessity of these packages is already conveyed to consuming packages. devDependencies already specifies react and react-dom @18 for use for development of this package.

Closes #26

The specification of react and react-dom @18 causes npm to pull a
version of react at that version within the package directory. This
causes a runtime issue if this is not the version of react that is
actually used by consumers when they attempt to serve those dependencies
without the version matching. `peerDependencies` suggests that this package
should be compatible with react and react-dom @17 as well, so the
expectation is that consumers can use v17 of those dependencies.

`peerDependencies` already specify react and react-dom @17/@18,
so the necessity of these packages is already conveyed to consuming
packages. `devDependencies` already specifies react and react-dom @18
for use for development of this package.

Closes jollyjerr#26
@Limegrass
Copy link
Contributor Author

Limegrass commented Jan 3, 2024

If necessary, I can construct a minimum reproduction repo; however, my test case was an issue at work, so I don't have one off hand. We worked around that by using patch-package to remove the dependency declaration there for the time being. The actual change seems fairly inoffensive though (in my opinion).

Copy link
Owner

@jollyjerr jollyjerr left a comment

Choose a reason for hiding this comment

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

Thank you 🙇🏼

@jollyjerr jollyjerr merged commit 38041ec into jollyjerr:main Jan 4, 2024
1 check passed
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.

Cannot read properties of null (reading 'useRef')
2 participants