You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ui-components): react in regular dependencies causes duplicate hook errors in consumer apps #9175
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.
I added it to the future, if, for example, there would be another package with react dependency - it would be good to have peer-react.
Not sure, but @node-core/platform-vercel is candidate, because it has peer react:
Activity
alexicum commentedon Oct 16, 2026
Thanks to @avivkeller and @MattIPv4 for attention to PR!
We have discussed that catalog:peer-react19 is redundant.
I added it to the future, if, for example, there would be another package with react dependency - it would be good to have peer-react.
Not sure, but @node-core/platform-vercel is candidate, because it has peer react: