File tree Expand file tree Collapse file tree 3 files changed +6
-41
lines changed Expand file tree Collapse file tree 3 files changed +6
-41
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,6 @@ module.hot.accept([
31
31
32
32
window . ___emitter = emitter
33
33
34
- if (
35
- process . env . GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES &&
36
- ! ReactDOM . createRoot
37
- ) {
38
- throw new Error (
39
- `The GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES flag is not compatible with your React version. Please install "[email protected] " and "[email protected] " or higher.`
40
- )
41
- }
42
-
43
34
const loader = new DevLoader ( asyncRequires , matchPaths )
44
35
setLoader ( loader )
45
36
loader . setApiRunner ( apiRunner )
@@ -141,10 +132,7 @@ apiRunnerAsync(`onClientEntry`).then(() => {
141
132
// render to avoid React complaining about hydration mis-matches.
142
133
let defaultRenderer = ReactDOM . render
143
134
if ( focusEl && focusEl . children . length ) {
144
- if (
145
- process . env . GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES &&
146
- ReactDOM . createRoot
147
- ) {
135
+ if ( ReactDOM . createRoot ) {
148
136
defaultRenderer = ReactDOM . createRoot
149
137
} else {
150
138
defaultRenderer = ReactDOM . hydrate
@@ -208,7 +196,10 @@ apiRunnerAsync(`onClientEntry`).then(() => {
208
196
< LoadingIndicatorEventHandler />
209
197
)
210
198
} else {
211
- renderer ( < LoadingIndicatorEventHandler /> , indicatorMountElement )
199
+ ReactDOM . render (
200
+ < LoadingIndicatorEventHandler /> ,
201
+ indicatorMountElement
202
+ )
212
203
}
213
204
}
214
205
}
Original file line number Diff line number Diff line change @@ -193,9 +193,7 @@ apiRunnerAsync(`onClientEntry`).then(() => {
193
193
const renderer = apiRunner (
194
194
`replaceHydrateFunction` ,
195
195
undefined ,
196
- process . env . GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES
197
- ? ReactDOM . createRoot
198
- : ReactDOM . hydrate
196
+ ReactDOM . createRoot ? ReactDOM . createRoot : ReactDOM . hydrate
199
197
) [ 0 ]
200
198
201
199
domReady ( ( ) => {
Original file line number Diff line number Diff line change @@ -182,30 +182,6 @@ const activeFlags: Array<IFlag> = [
182
182
umbrellaIssue : `https://gatsby.dev/functions-feedback` ,
183
183
testFitness : ( ) : fitnessEnum => `LOCKED_IN` ,
184
184
} ,
185
- {
186
- name : `CONCURRENT_FEATURES` ,
187
- env : `GATSBY_EXPERIMENTAL_CONCURRENT_FEATURES` ,
188
- command : `all` ,
189
- telemetryId : `ConcurrentFeatures` ,
190
- experimental : true ,
191
- description : `Enable React's concurrent features` ,
192
- // umbrellaIssue: `https://gatsby.dev/concurrent-features`,
193
- testFitness : ( ) : fitnessEnum => {
194
- // Because of this, this flag will never show up
195
- const semverConstraints = {
196
- react : `^0.0.0-experimental-2bf4805e4` ,
197
- "react-dom" : `^0.0.0-experimental-2bf4805e4` ,
198
- }
199
-
200
- if ( satisfiesSemvers ( semverConstraints ) ) {
201
- return true
202
- } else {
203
- // react & react-dom is either not installed or not new enough so
204
- // just disable — it won't work anyways.
205
- return false
206
- }
207
- } ,
208
- } ,
209
185
{
210
186
name : `LMDB_STORE` ,
211
187
env : `GATSBY_EXPERIMENTAL_LMDB_STORE` ,
You can’t perform that action at this time.
0 commit comments