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

[New] add explicit react 17 support #74

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

[New] add explicit react 17 support #74

wants to merge 3 commits into from

Conversation

ljharb
Copy link
Owner

@ljharb ljharb commented Oct 26, 2020

Fixes #73.

@ljharb ljharb added semver-minor: new stuff hacktoberfest-accepted If you're interested in a free shirt, this PR counts towards it. labels Oct 26, 2020
@ljharb
Copy link
Owner Author

ljharb commented Oct 26, 2020

This is blocked on enzymejs/enzyme#2430

@max-pv
Copy link

max-pv commented Feb 19, 2021

@ljharb Thanks for adding this. I think it would be great if the peer dependency also supported ^16.0.0 instead of ^16.0.0-alpha.

@ljharb
Copy link
Owner Author

ljharb commented Feb 19, 2021

@br4in3x why? That’s strictly fewer versions.

@tdd
Copy link

tdd commented May 3, 2021

Hey @br4in3x and team, can we please get progress on this? Lack of React 17 peer dep definition has forced us to use --force / --legacy-peer-deps every npm install since last Fall. That seems like a tiny change to make. I can assure you the module works fine with React 17.

@ljharb
Copy link
Owner Author

ljharb commented May 3, 2021

@tdd glad to hear it; we’re still waiting on #74 (comment) so that we don’t need to rely on such assurances.

@jasco

This comment has been minimized.

@ljharb

This comment has been minimized.

@marksmccann
Copy link

Looks like this PR has been sitting for some time. Is there any intention to add React 17 support? If so, can we get an ETA?

@ljharb
Copy link
Owner Author

ljharb commented Apr 2, 2022

@marksmccann yes, the intention is eternal. There is no ETA, because enzyme’s react 17 support has no ETA. Once that lands, this can.

@marksmccann
Copy link

marksmccann commented Apr 2, 2022

@ljharb Thanks for the quick reply. Looks like you've been waiting over a year and a half for enzyme to add support React 17. Looks like they also have attempted to update, but stalled out. And now that React 18 is out, you're getting further behind. Is there a point at which you throw in the towel and start searching for an alternative solution? Granted, I wouldn't want to do the migration, I'm just curious.

@ljharb
Copy link
Owner Author

ljharb commented Apr 2, 2022

If an actual full alternative to enzyme were to appear (none currently exist) then I'd probably deprecate enzyme in favor of it, and switch this package to use it. However, there doesn't seem to be any interest in the community to fill that need, nor from the react team, so I remain convinced that the best path is still for enzyme to add support, and for these packages to continue to use it for testing.

@Im-Fran
Copy link

Im-Fran commented Jan 24, 2023

If an actual full alternative to enzyme were to appear (none currently exist) then I'd probably deprecate enzyme in favor of it, and switch this package to use it. However, there doesn't seem to be any interest in the community to fill that need, nor from the react team, so I remain convinced that the best path is still for enzyme to add support, and for these packages to continue to use it for testing.

I found this library that has support for react 18: https://testing-library.com/docs/react-testing-library/migrate-from-enzyme maybe it'll help. That library also includes a migration from enzyme that could make the transition easier.

@ljharb
Copy link
Owner Author

ljharb commented Jan 24, 2023

@Im-Fran no, unfortunately that package/ecosystem doesn't come remotely close to replicating enzyme's capabilities.

@Im-Fran
Copy link

Im-Fran commented Jan 24, 2023

Is this what you're talking about?
image

Anyway, you know more than me about this repo 😆 so you're the one to choose. Have you found any other alternative? because maybe it would be time to fork enzyme and update it by yourself

@Im-Fran
Copy link

Im-Fran commented Jan 24, 2023

Mainly to support new versions, because I'm personally using the react outside click handler and it's holding me back. Even if it works in react 18 I would prefer for it to be officially supported.

@ljharb
Copy link
Owner Author

ljharb commented Jan 24, 2023

I maintain enzyme, so there's no need to fork it - I just need the time, the help, or the money (such that I can create the time or hire the help) to update it, and it's been 5 years without anyone providing sufficient amounts of any of those.

@Im-Fran
Copy link

Im-Fran commented Jan 24, 2023

I know this question shouldn't be in this issue (because it is from another repo), but why not merging enzymejs/enzyme#2430? It's been there since 2020. I know that you need to make sure it works and everything, then post the release, but it would be a step forward merging some PRs, also it seems that one was already discussed by you and other people.

@Im-Fran
Copy link

Im-Fran commented Jan 24, 2023

Also I wanted to thank you for your hard work <3 it's really good what you're doing with all these libraries :p

@Im-Fran
Copy link

Im-Fran commented Jan 24, 2023

ok, just finished reading all the comments, and I saw that react had added some stuff that broke compatibility with enzyme. But that was react 17, what about 18?

@ljharb
Copy link
Owner Author

ljharb commented Jan 24, 2023

I can't support 18 until I support 17 - and again, it's about available time.

@Im-Fran
Copy link

Im-Fran commented Jan 24, 2023

Can I reach to you through twitter? Seems faster than this issue replies xD my username in twitter is Im_Fran_ I want to try and help you

@ljharb
Copy link
Owner Author

ljharb commented Jan 24, 2023

yep, same username as here, my DMs are open

@simarmannsingh

This comment was marked as resolved.

@ljharb ljharb force-pushed the main branch 2 times, most recently from 879f592 to 3c49142 Compare May 31, 2024 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted If you're interested in a free shirt, this PR counts towards it. semver-minor: new stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React 17 peer support
7 participants