Description
Currently, react is listed under dependencies in packages/ui-components/package.json.
While it works fine inside the monorepo, it breaks consumer apps that use a different sub-version of React 19. Package managers install a duplicate copy of React , leading to the runtime error:
Invalid hook call. You might have more than one copy of React in the same app.
Proposed Solution
Move react from dependencies to peerDependencies (and duplicate in devDependencies for local workspace builds).
We should use a named pnpm catalog (catalog:peer-react19 with a ^19.0.0 range) so the published package accepts any React 19 version installed by the consumer app.
Description
Currently,
reactis listed underdependenciesinpackages/ui-components/package.json.While it works fine inside the monorepo, it breaks consumer apps that use a different sub-version of React 19. Package managers install a duplicate copy of React , leading to the runtime error:
Proposed Solution
Move
reactfromdependenciestopeerDependencies(and duplicate indevDependenciesfor local workspace builds).We should use a named pnpm catalog (
catalog:peer-react19with a^19.0.0range) so the published package accepts any React 19 version installed by the consumer app.