yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

Updating peer dependencies to support React v. 18 #135

Closed haase1020 closed 1 year ago

haase1020 commented 2 years ago

First of all, thank you for this package! I would like to continue using react-flickity-component in my project, but I am getting an error about an incorrect peer dependency when I try to upgrade to React v. 18. Is it possible to update peer dependencies to support React v. 18? I am more than happy to help in any way I can!

yaodingyd commented 2 years ago

PR is welcome. Could you also verify it is working with react 18?

haase1020 commented 2 years ago

Sounds good! I will submit a PR as soon as I verify that the code works with react 18.

nathnhughes commented 2 years ago

+1 for this 👍

At first glance, it seems my issue is to do with React no longer including children in the default component props, so would need to integrate PropsWithChildren.

PQPMath3ws commented 2 years ago

Works in some days... Now, the error with react 18 persists again.

j2is commented 1 year ago

Ditto

bogdanbryzh commented 1 year ago

npm refuses to install react-flickity-component, but yarn installs it, with error tho image

It works perfectly with react > 18

bogdanbryzh commented 1 year ago

Here's working app example https://showcase-rfc-with-react-18.vercel.app/ And repo https://github.com/bogdanbpeterson/showcase-rfc-with-react-18

ogaguinaga commented 1 year ago

Is there any news o this? i would like to use this package with react 18 🙂

bogdanbryzh commented 1 year ago

Is there any news o this? i would like to use this package with react 18 🙂

You can, install it with yarn, but it's not safe (haha, it's obvious, isn't it? 😂)

ogaguinaga commented 1 year ago

yeah... 😅 I meant more about this issue being merged and released

yaodingyd commented 1 year ago

PR welcome

cooperwfloyd commented 1 year ago

@bogdanbpeterson looks like your example is working great with React 18 — you could PR the changes that you made? Looking forward to using this with Next.js 13, as their minimum React version is 18.

bogdanbryzh commented 1 year ago

@cooperwfloyd I changed literally nothing, just installed it using yarn instead of npm. I don't even know what to change to create a PR 😅

cooperwfloyd commented 1 year ago

Haha 😆 well thanks for the quick reply @bogdanbpeterson. My guess is that it is a conflict with the newer Node / NPM versions and how they check peer dependencies then. Thanks for the info 👍

ogaguinaga commented 1 year ago

is there any news on this PR?

ogaguinaga commented 1 year ago

Is there a reason why this is not moving anywhere? I would love to use this 😅 anything I can do to help and accelerate this process?

cooperwfloyd commented 1 year ago

@ogaguinaga someone just needs to PR the changes to make this library compatible with React 18 and recent Node versions without the use of --legacy-peer-deps during installation. If you want to move this forward and have the time you are welcome to PR those changes 👍

yaodingyd commented 1 year ago

v4.0.0 is released with react 18 support.

bogdanbryzh commented 1 year ago

yay, good news 🥳

cooperwfloyd commented 1 year ago

amazing! thank you so much @yaodingyd! fully ready now to make the upgrade to Next.js 13 💪