wso2 / oxygen-ui

The Design System powering WSO2 products.
https://wso2.github.io/oxygen-ui
Apache License 2.0
42 stars 23 forks source link

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

Open movinsilva opened 4 months ago

movinsilva commented 4 months ago

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