File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import React, {
8
8
useMemo ,
9
9
useState ,
10
10
forwardRef ,
11
- version ,
11
+ use ,
12
12
} from 'react'
13
13
import ReactDOM from 'react-dom'
14
14
import Head from '../shared/lib/head'
@@ -168,11 +168,8 @@ function handleLoading(
168
168
function getDynamicProps (
169
169
fetchPriority ?: string
170
170
) : Record < string , string | undefined > {
171
- const [ majorStr , minorStr ] = version . split ( '.' , 2 )
172
- const major = parseInt ( majorStr , 10 )
173
- const minor = parseInt ( minorStr , 10 )
174
- if ( major > 18 || ( major === 18 && minor >= 3 ) ) {
175
- // In React 18.3.0 or newer, we must use camelCase
171
+ if ( Boolean ( use ) ) {
172
+ // In React 19.0.0 or newer, we must use camelCase
176
173
// prop to avoid "Warning: Invalid DOM property".
177
174
// See https://github.com/facebook/react/pull/25927
178
175
return { fetchPriority }
You can’t perform that action at this time.
0 commit comments