-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Should this be an RFC?
- This is not a substantial change
Which package is this a feature request for?
React (@lit/react)
Description
@lit/react appears to work in React 19 in my limited testing. The only issue is that this line in package.json needs to be updated to add || 19
lit/packages/react/package.json
Line 199 in 267d243
| "@types/react": "17 || 18" |
I understand that React 19 supports custom elements, removing the need for wrappers. However, to smooth the ecosystem migration, it might be a good idea to support wrappers in React 19 too.
Use cases:
- Forcing people to refactor out all wrappers usages and drop
@lit/reactbefore adopting React 19 is going to make the migration burden harder. Better let people gradually adopt React 19 and drop wrappers afterward. - In a monorepo, some packages might update to React 19 before others
- Example: updating storybook may require updating to React 19, while the code is not ready to
- Using wrappers may have better DX because IDEs can auto-import them on usages, and detect needless imports (assuming the package that uses
@lit/reacthas separate entrypoint for each component wrapper, with a side effect import of the component inside) - not so for side-effect component imports.
Alternatives and Workarounds
Use yarn/npm "resolutions" to force @llit/react to work with @types/react@19.
eliasmohsengrenvald, Artur-, lin72h, bendera, JSMike and 4 moreschilchSICKAG, tszalbot and artursopelnik
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📋 Triaged