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

Support for React 19 #590

Closed
Tracked by #716
praseodym opened this issue Dec 10, 2024 · 7 comments
Closed
Tracked by #716

Support for React 19 #590

praseodym opened this issue Dec 10, 2024 · 7 comments
Labels
needs triage needs to be reviewed

Comments

@praseodym
Copy link

React 19 has been released and Ladle does not seem to be compatible yet.

When trying to update, react-inspector is incompatible according to npm. There is an issue for this: storybookjs/react-inspector#185.

@praseodym praseodym added the needs triage needs to be reviewed label Dec 10, 2024
@tajo
Copy link
Owner

tajo commented Dec 12, 2024

Will add the support by the end of year with some other major changes (Vite v6).

@tajo
Copy link
Owner

tajo commented Dec 23, 2024

implemented in #591

@tajo tajo closed this as completed Dec 23, 2024
@praseodym
Copy link
Author

The lack of support for React 19 in react-inspector still creates a dependency conflict with Ladle 5.0.0:

> npm install
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn   react@"^19.0.0" from the root project
npm warn   6 more (@ladle/react, @ladle/react-context, @mdx-js/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.4 || ^17.0.0 || ^18.0.0" from [email protected]
npm warn node_modules/@ladle/react/node_modules/react-inspector
npm warn   react-inspector@"^6.0.2" from @ladle/[email protected]
npm warn   node_modules/@ladle/react
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/react
npm warn   peer react@"^16.8.4 || ^17.0.0 || ^18.0.0" from [email protected]
npm warn   node_modules/@ladle/react/node_modules/react-inspector
npm warn     react-inspector@"^6.0.2" from @ladle/[email protected]
npm warn     node_modules/@ladle/react

This is from a simple test project with the following dependencies:

  "dependencies": {
    "@ladle/react": "^5.0.0",
    "react": "^19.0.0",
    "react-dom": "^19.0.0"
  }

praseodym added a commit to kiesraad/abacus that referenced this issue Dec 31, 2024
Broken due to react-inspector:
tajo/ladle#590 (comment)
@tajo
Copy link
Owner

tajo commented Jan 3, 2025

It's just a warning but should function fine?

@praseodym
Copy link
Author

It does work, but the conflicting peer dependency is a blocker for us. We configured npm with the strict-peer-deps option to prevent e.g. Dependabot accidentally breaking dependencies.

@tajo
Copy link
Owner

tajo commented Jan 29, 2025

convo can continue here: #590 (comment)

@praseodym
Copy link
Author

convo can continue here: #590 (comment)

I think you meant to link to #597. Let's continue there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage needs to be reviewed
Projects
None yet
Development

No branches or pull requests

2 participants