FormidableLabs / nuka-carousel

Small, fast, and accessibility-first React carousel library with an easily customizable UI and behavior to fit your brand and site.
https://commerce.nearform.com/open-source/nuka-carousel
Other
3k stars 596 forks source link

Remove defaultProps for React 18.3.0 #997

Closed Shoreasg closed 2 months ago

Shoreasg commented 1 year ago

Nuka Version: 5.41 React Version: 18.2.0 Chrome

Problem Carousel: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. Getting this error due to this PR

https://github.com/jsx-eslint/eslint-plugin-react/issues/2396 https://github.com/facebook/react/pull/16210

Need to fix this before the release of react 18.3.0

VanTanev commented 1 year ago

Just wanted to mention, we're now hitting this in nextjs 13.4 with app router - it's shipping a canary of React that has the deprecation warning.

Looking at the code, it seems to be a one-line change to fix it. I'll open a simple PR.

carbonrobot commented 2 months ago

With the release of Nuka v8, defaultProps have been removed from the codebase