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:
|
ReactCodepen.defaultProps = { |
|
defaultTab: 'css,result', |
|
height: 300, |
|
preview: true, |
|
editable: false, |
|
themeId: 'dark', |
|
version: 2, |
|
}; |
Links to React PR and ESLint change:
Description
This issue is based on this issue
The error that happens when using
react-codepen-embedwith React 18The root of the problem:
react-codepen-embed/src/index.js
Lines 80 to 87 in f472f58
Links to React PR and ESLint change:
defaultPropsrule to be deprecated on function components jsx-eslint/eslint-plugin-react#2396