React 18 support for Plugins - #2116
Merged
Merged
Conversation
-Changes the development and test versions of React, ReactDom, and react-test-renderer to the 18.2 version used in mattermost. - Swaps out the pre-React 18 version of `render` to `createRoot` and fixes some type errors that surface with React 18. - Removes unneeded and deprecated "@types/react-bootstrap": "1.0.1" in package.json
hmhealey
approved these changes
Oct 31, 2025
hmhealey
left a comment
Member
There was a problem hiding this comment.
Thanks for redoing that. This looks much cleaner to me.
I'm a bit surprised that you only had to upgrade React and React DOM here since I ended up falling down a rabbit hole of related dependencies last time I tried this because NPM started complaining about other libraries like React Redux being incompatible. I thought that I might have my NPM set to be stricter somehow, but I'm able to build this branch just fine. Perhaps that issue was causing by some other dependency in the web app and I didn't need to change it elsewhere.
2 tasks
calebroseland
approved these changes
Nov 3, 2025
calebroseland
approved these changes
Nov 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This replaces the prior PR that created mocks for reactBootstrap. My concern was that I didn't want to bundle our own version of react-bootstrap, but Jest couldn't access the external version. @calebroseland pointed out that just putting it into package.json didn't cause it to be bundled, but did mean that the development and test environments could use it. Thanks Caleb!
-Changes the development and test versions of React, ReactDom, and react-test-renderer to the 18.2 version used in mattermost.
rendertocreateRootTicket Link
N/A
Checklist
Gated by experimental feature flagUnit tests updated