react-codepen-embed icon indicating copy to clipboard operation
react-codepen-embed copied to clipboard

FunctionComp.defaultProps is deprecated in React 18

Open danieltott opened this issue 2 years ago • 0 comments

Description

This issue is based on this issue

The error that happens when using react-codepen-embed with React 18

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

The root of the problem:

https://github.com/shettypuneeth/react-codepen-embed/blob/f472f580b3d2751eb5f3c695591527138fcb82e8/src/index.js#L80-L87

Links to React PR and ESLint change:

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

danieltott avatar Jun 29 '23 18:06 danieltott