Bunlong / next-share

Social media share buttons and share counts for your next React apps.
https://next-share.js.org
MIT License
242 stars 34 forks source link

Warning: Support for defaultProps will be removed in a future major release #71

Closed Nicolab closed 1 year ago

Nicolab commented 1 year ago

Hello,

Thanks for this useful package ;)

There is this big warning in the console:

Warning: n: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

 at n (webpack-internal:///(app-client)/./node_modules/.pnpm/next-share@0.19.0_react@18.2.0/node_modules/next-share/dist/next-share.es.js:70:2471)
ShaneYu commented 1 year ago

I can confirm this is still occurring in version 0.20.0 also.

eltel commented 1 year ago

Here too, any news on an update or on how to fix?

ndpniraj commented 1 year ago

The error is comming from Icon component using inside the buttons, I changed the Icon with custom SVG icons and there is no warning.

maykon-oliveira commented 1 year ago

Any news?

joemcbroom commented 1 year ago

Addressed here: https://github.com/Bunlong/next-share/pull/80

pife00 commented 1 year ago

As said ndpniraj the problem are icons, this works for me in next 13.4, i used react icon

<TwitterShareButton url={shareUrl} title={${post.title}} >