Skip to content

React 18 support for Plugins - #2116

Merged
calebroseland merged 2 commits into
masterfrom
react18-for-playbooks
Nov 3, 2025
Merged

React 18 support for Plugins#2116
calebroseland merged 2 commits into
masterfrom
react18-for-playbooks

Conversation

@jgheithcock

Copy link
Copy Markdown
Contributor

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.

  • Swaps out the pre-React 18 version of render to createRoot
  • Fixes some type errors that surface with React 18 and reactBootstrap
  • Removes unneeded and deprecated "@types/react-bootstrap": "1.0.1" in package.json

Ticket Link

N/A

Checklist

  • Gated by experimental feature flag
  • Unit tests updated

-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 hmhealey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hmhealey hmhealey mentioned this pull request Oct 31, 2025
2 tasks
@calebroseland
calebroseland merged commit b007f87 into master Nov 3, 2025
23 checks passed
@calebroseland
calebroseland deleted the react18-for-playbooks branch November 3, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants