ljharb / prop-types-tools

Custom React PropType validators
MIT License
671 stars 50 forks source link

React 17 peer support #73

Open deavial opened 3 years ago

deavial commented 3 years ago

NPM warning airbnb-prop-types@2.16.0 requires a peer of react@^0.14 || ^15.0.0 || ^16.0.0-alpha but none is installed. You must install peer dependencies yourself. with React 17.

Please release support for the peer dependency.

ljharb commented 3 years ago

I put up #74; it's blocked by the lack of an enzyme adapter for react 17.

leepowelldev commented 3 years ago

What about re-writing the tests to use an alternative testing library? How much does it actually use Enzyme? I can't see much usage of it. This means we could release this without waiting for Enzyme adaptor?

ljharb commented 3 years ago

I’m not particularly interested in doing that; and either way, there doesn’t exist an alternative react testing library for testing in a non-browser context.

ljrodriguez1 commented 3 years ago

Hello, there is now an adapter for Enzyme, i will link it here.

Can we please have an update for this. it is really important as React 17 is growing on popularity.

https://www.npmjs.com/package/@wojtekmaj/enzyme-adapter-react-17

You can see that this package has 300.000 downloads weekly.

ljharb commented 3 years ago

No, there isn’t. That’s an unofficial one.

Luksys5 commented 2 years ago

There's enzyme-adapter-react-17 package, Can we re-open this issue again?

ljharb commented 2 years ago

@Luksys5 no, because that's an unofficial package. if it worked reliably, i'd have published the official one.

Also, the issue doesn't need to be reopened, because it's still open now.

sariza369 commented 2 years ago

def can benefit from this! thanks op

Vankydwivedi commented 8 months ago

is there any version of airbnb-prop-types which depends on react 17 version

ljharb commented 8 months ago

Not yet, otherwise this issue would be closed.

Vankydwivedi commented 8 months ago

ok