React 19 support
Summary
@jitsu/jitsu-react is not currently supported with React 19. The package's peer dependencies likely restrict it to earlier React versions, causing dependency resolution conflicts when trying to use it in projects that have upgraded to React 19.
Expected Behavior
@jitsu/jitsu-react should be compatible with React 19 and install without peer dependency warnings or conflicts.
Current Behavior
When attempting to install @jitsu/jitsu-react in a project using React 19, npm/yarn shows peer dependency conflicts and may require using --legacy-peer-deps or --force flags to bypass the issue.
System configuration and versions
Jitsu Version: Jitsu Next (current/latest version)
React Version: 19.x Node.js Version: [Your Node.js version] Package Manager: npm/yarn [specify which and version] Operating System: [Your OS]
Reproduction Steps
Create a new React 19 project or upgrade an existing project to React 19
Attempt to install @jitsu/jitsu-react:
npm install @jitsu/jitsu-react
Observe peer dependency conflict errors
Error Output
npm error While resolving: @jitsu/[email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error react@"^19.1.0" from the root project
Additional Context
React 19 introduced several breaking changes including:
Removal of legacy context APIs Changes to ref handling (ref is now a regular prop) Stricter peer dependency validation
Many React ecosystem packages are experiencing similar compatibility issues and are updating their peer dependencies to include React 19 support.
Suggested Solution
Update the peerDependencies in @jitsu/jitsu-react's package.json to include React 19:
json{
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
}
This would allow the package to work with React 19 while maintaining backward compatibility with earlier versions.
Workaround
Currently using --legacy-peer-deps flag as a temporary workaround, but this is not ideal for production applications.
Related Issues
Similar React 19 compatibility issues have been reported in other popular React libraries:
[Similar pattern being addressed across the React ecosystem]