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 React 19 ([email protected]) #2641

Closed
JasonAtallah opened this issue Feb 11, 2025 · 5 comments · Fixed by #2643
Closed

Support React 19 ([email protected]) #2641

JasonAtallah opened this issue Feb 11, 2025 · 5 comments · Fixed by #2643
Labels

Comments

@JasonAtallah
Copy link

Motivation
The current version of stream-react-chat is incompatible with React 19 due to its dependency on react-markdown 8.x. This older version of react-markdown causes TypeScript errors and compatibility issues when used with React 19, specifically around JSX namespace declarations. This prevents developers from upgrading their applications to the latest version of React while using stream-react-chat.

Proposed solution
Upgrade the react-markdown dependency in stream-react-chat from version 8.x to version 9.x. This newer version includes proper TypeScript support for React 19 and resolves the JSX namespace declaration issues.

Changes required:

  • Update package.json to use react-markdown ^9.0.0
  • Update any breaking changes in the implementation that might be affected by the react-markdown upgrade
  • Update peer dependencies to include React 19 support
  • Update TypeScript types to accommodate the new react-markdown version

Acceptance Criteria
[ ] react-markdown is upgraded to version 9.x in package.json
[ ] All existing markdown rendering functionality continues to work as expected
[ ] TypeScript compilation succeeds without JSX namespace errors
[ ] Package works correctly with React 19
[ ] All existing tests pass with the new implementation
[ ] Peer dependency warnings are resolved when used with React 19

Additional context:
This upgrade is critical for developers who want to use stream-react-chat in modern React applications while maintaining type safety and avoiding deprecation warnings.

@JasonAtallah JasonAtallah added the feature New capability label Feb 11, 2025
@dmilin1
Copy link

dmilin1 commented Feb 11, 2025

My team also needs this. Seems like it just requires a dependency version bump of react-markdown.

@MartinCupela
Copy link
Contributor

Hey, please follow these intructions:

#2615 (comment)

The situation with react-markdown is complicated. Version 9 does not support React 17 and 16, but stream-chat-react has to as many integrators have their apps with these versions of React

@JasonAtallah
Copy link
Author

JasonAtallah commented Feb 11, 2025

@MartinCupela That doesn't seem to work with pnpm - I'm having this issue as well

@MartinCupela
Copy link
Contributor

Hey @JasonAtallah , we will be upgrading react-markdown to v9

@stream-ci-bot
Copy link

🎉 This issue has been resolved in version 12.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

4 participants