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

React 19 Support #6724

Closed
sja-cslab opened this issue Jun 4, 2024 · 12 comments · Fixed by #6725 or leoo1992/GeradorQRCode#57 · May be fixed by nhattpn/BTL_LTNC#56
Closed

React 19 Support #6724

sja-cslab opened this issue Jun 4, 2024 · 12 comments · Fixed by #6725 or leoo1992/GeradorQRCode#57 · May be fixed by nhattpn/BTL_LTNC#56
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@sja-cslab
Copy link
Contributor

sja-cslab commented Jun 4, 2024

Describe the bug

Just curious how the plans are.

PrimeReact version

11.X

React version

19.x

Language

ALL

Build / Runtime

ALL

Browser(s)

ALL

@sja-cslab sja-cslab added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 4, 2024
@melloware melloware 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 Jun 4, 2024
@melloware melloware added this to the 11.0.0 milestone Jun 4, 2024
@melloware
Copy link
Member

let me look at this

melloware added a commit to melloware/primereact that referenced this issue Jun 4, 2024
@melloware
Copy link
Member

PR submitted to get the ball rolling.

@sja-cslab
Copy link
Contributor Author

PR submitted to get the ball rolling.

Would be perfect if you already get React 18.3.3 in package.json - in 18.3.3 they added deprecation warnings for 19

@melloware
Copy link
Member

weird when i run npm outdated is says 18.3.1 is the latest there is no 18.3.3?

@sja-cslab
Copy link
Contributor Author

sja-cslab commented Jun 4, 2024

You're correct it was 18.3.1 indeed. Just updated my local package and got wrong line ;)

https://github.com/facebook/react/blob/main/CHANGELOG.md

@sja-cslab
Copy link
Contributor Author

sja-cslab commented Jun 4, 2024

Now npx codemod@latest react/19/migration-recipe and see the magic happen 😄

@melloware
Copy link
Member

Testing now 😄

@sja-cslab
Copy link
Contributor Author

If you did not see, they got a guide for upgrading

@sja-cslab
Copy link
Contributor Author

@melloware After playing around a bit it seems that PrimeReact is currently React 19 compatible (almost).
I get deprecation warnings here and there about element.props.ref which needs to get replaced by element.ref.

What's not yet implemented in React 19 RC is the deprecation of forwardRef they're going to remove it in future so you can always use it as a property. They're going to release a codemod for this. If we're lucky that can handle the code.

The currently released codemods does not change any code in PrimeReact so far.

@melloware
Copy link
Member

I think we are in good shape my PR only clarifies it for build tools that 19 is OK to use with PR.

@melloware melloware self-assigned this Jun 5, 2024
@melloware melloware modified the milestones: 11.0.0, 10.7.0 Jun 5, 2024
@sja-cslab
Copy link
Contributor Author

Are you sure 10.7 is a good milestone? React 19 is RC currently and as far as I know, there is no official timeline for the final version. How's the timeline for 10.7?

@melloware
Copy link
Member

i think its harmless to add as its just adding this really as a hint to build tools

"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"

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
2 participants