Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FunctionComp.defaultProps is deprecated in React 18 #16

Open
danieltott opened this issue Jun 29, 2023 · 0 comments · May be fixed by #17
Open

FunctionComp.defaultProps is deprecated in React 18 #16

danieltott opened this issue Jun 29, 2023 · 0 comments · May be fixed by #17

Comments

@danieltott
Copy link

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:

danieltott added a commit to danieltott/react-codepen-embed that referenced this issue Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant