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

Core: Deprecated defaultProps still used #3786

Closed
rocketana opened this issue Dec 15, 2022 · 2 comments
Closed

Core: Deprecated defaultProps still used #3786

rocketana opened this issue Dec 15, 2022 · 2 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@rocketana
Copy link

Describe the bug

It seems that Primereact uses the deprecated defaultProps (became deprecated yet in 2019 (RFC)). Now, if you try to use the UI in your React 18 project with React Dev Tools enabled, you'll get a warning about it.

image

image

Any plans to refactor the deprecated code?

Reproducer

No response

PrimeReact version

8.7.3

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

  1. Include any Primereact in your React (18.x) / Next.js component (it can be Button or anything else).
  2. Install React Dev Tools if not yet installed (in the latest Chrome).
  3. Load a page with the component in the browser.
  4. See the long list of warnings in the browser's console.

Expected behavior

No deprecated code expected.

@rocketana rocketana added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 15, 2022
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 15, 2022
@mertsincan mertsincan self-assigned this Dec 15, 2022
@mertsincan mertsincan added this to the 9.0.0 milestone Dec 15, 2022
@melloware
Copy link
Member

melloware commented Dec 15, 2022

@rocketana thanks for reporting looks like this has been marked for 9.0

I had to read this so I could understand the evolution in React: https://blog.logrocket.com/complete-guide-react-default-props/

@melloware melloware changed the title Deprecated defaultProps still used Core: Deprecated defaultProps still used Dec 15, 2022
@cagataycivici
Copy link
Member

This was being planned for 9.0.RC next week. Thanks.

@mertsincan mertsincan modified the milestones: 10.0.0, 9.0.0 Feb 2, 2023
@mertsincan mertsincan added the Status: In Progress Core Team is working on the issue or pull request label Feb 2, 2023
@mertsincan mertsincan reopened this Feb 3, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 3, 2023
@mertsincan mertsincan removed Status: In Progress Core Team is working on the issue or pull request Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

4 participants