File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import React, {
88 useMemo ,
99 useState ,
1010 forwardRef ,
11- version ,
11+ use ,
1212} from 'react'
1313import ReactDOM from 'react-dom'
1414import Head from '../shared/lib/head'
@@ -168,11 +168,8 @@ function handleLoading(
168168function getDynamicProps (
169169 fetchPriority ?: string
170170) : 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
176173 // prop to avoid "Warning: Invalid DOM property".
177174 // See https://github.com/facebook/react/pull/25927
178175 return { fetchPriority }
You can’t perform that action at this time.
0 commit comments