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

Deprecated defaultProps in @oxygen-ui/react components #215

Open
movinsilva opened this issue May 1, 2024 · 0 comments
Open

Deprecated defaultProps in @oxygen-ui/react components #215

movinsilva opened this issue May 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@movinsilva
Copy link

Describe the issue:

The components in the @oxygen-ui/react library are using defaultProps, which is deprecated in function components in React. This results in console warnings, such as the one shown for the Typography component.

image

Refer react docs.

How to reproduce:

  1. Create a new react application.
  2. Install the @oxygen-ui/react library by running pnpm i @oxygen-ui/react.
  3. Import and use a component from the @oxygen-ui/react library which uses default props (e.g., Typography, Input, Drawer).
  4. Start the application and observe the warnings in the browser's console.

Expected behavior:

No deprecation warnings should be shown in the console when using any component from the @oxygen-ui/react library.

Environment information

  • Affected Package: @oxygen-ui/react
  • Library Version: 1.11.0
  • OS: Windows
  • Browser: Google Chrome Version 123.0.6312.107
@movinsilva movinsilva added the bug Something isn't working label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant