Closed cjbell closed 2 months ago
Latest commit: 7f21868fa9648a2dc5731b5970607f99ceea1f76
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
javascript-slack-connect-example | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 11, 2024 2:48am |
javascript-slack-kit-example | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 11, 2024 2:48am |
When using React < 18 users will run into this error:
The issue is described in this thread: https://github.com/facebook/react/issues/20235
The fix was implemented in React 18, but the only "fixes" that exist if we're using the JSX runtime are to patch webpack configs, which is not great.
Instead, this PR implements an option to use the "classic" JSX runtime, which is the
createElement
API as a workaround so thatreact/jsx-runtime
is never referenced. To do so, we also needed to ensure thatimport React from "react"
was at the top of all of our JSX components, which is what thebabel-plugin-require-react
does.I tested this locally in our example apps with a build and everything works