diff --git a/packages/gatsby/cache-dir/app.js b/packages/gatsby/cache-dir/app.js
index 87091a43c4601..cec3679589f84 100644
--- a/packages/gatsby/cache-dir/app.js
+++ b/packages/gatsby/cache-dir/app.js
@@ -31,15 +31,6 @@ module.hot.accept([
window.___emitter = emitter
-if (
- process.env.GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES &&
- !ReactDOM.createRoot
-) {
- throw new Error(
- `The GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES flag is not compatible with your React version. Please install "react@0.0.0-experimental-2bf4805e4" and "react-dom@0.0.0-experimental-2bf4805e4" or higher.`
- )
-}
-
const loader = new DevLoader(asyncRequires, matchPaths)
setLoader(loader)
loader.setApiRunner(apiRunner)
@@ -141,10 +132,7 @@ apiRunnerAsync(`onClientEntry`).then(() => {
// render to avoid React complaining about hydration mis-matches.
let defaultRenderer = ReactDOM.render
if (focusEl && focusEl.children.length) {
- if (
- process.env.GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES &&
- ReactDOM.createRoot
- ) {
+ if (ReactDOM.createRoot) {
defaultRenderer = ReactDOM.createRoot
} else {
defaultRenderer = ReactDOM.hydrate
@@ -208,7 +196,10 @@ apiRunnerAsync(`onClientEntry`).then(() => {
)
} else {
- renderer(, indicatorMountElement)
+ ReactDOM.render(
+ ,
+ indicatorMountElement
+ )
}
}
}
diff --git a/packages/gatsby/cache-dir/production-app.js b/packages/gatsby/cache-dir/production-app.js
index 4b5fc4e90e21f..38f2746f791b4 100644
--- a/packages/gatsby/cache-dir/production-app.js
+++ b/packages/gatsby/cache-dir/production-app.js
@@ -193,9 +193,7 @@ apiRunnerAsync(`onClientEntry`).then(() => {
const renderer = apiRunner(
`replaceHydrateFunction`,
undefined,
- process.env.GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES
- ? ReactDOM.createRoot
- : ReactDOM.hydrate
+ ReactDOM.createRoot ? ReactDOM.createRoot : ReactDOM.hydrate
)[0]
domReady(() => {
diff --git a/packages/gatsby/src/utils/flags.ts b/packages/gatsby/src/utils/flags.ts
index 6af2c9dfc023a..df8b85e788382 100644
--- a/packages/gatsby/src/utils/flags.ts
+++ b/packages/gatsby/src/utils/flags.ts
@@ -182,30 +182,6 @@ const activeFlags: Array = [
umbrellaIssue: `https://gatsby.dev/functions-feedback`,
testFitness: (): fitnessEnum => `LOCKED_IN`,
},
- {
- name: `CONCURRENT_FEATURES`,
- env: `GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES`,
- command: `all`,
- telemetryId: `ConcurrentFeatures`,
- experimental: true,
- description: `Enable React's concurrent features`,
- // umbrellaIssue: `https://gatsby.dev/concurrent-features`,
- testFitness: (): fitnessEnum => {
- // Because of this, this flag will never show up
- const semverConstraints = {
- react: `^0.0.0-experimental-2bf4805e4`,
- "react-dom": `^0.0.0-experimental-2bf4805e4`,
- }
-
- if (satisfiesSemvers(semverConstraints)) {
- return true
- } else {
- // react & react-dom is either not installed or not new enough so
- // just disable — it won't work anyways.
- return false
- }
- },
- },
{
name: `LMDB_STORE`,
env: `GATSBY_EXPERIMENTAL_LMDB_STORE`,