mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
When we detect if `reactRoot` rendering should be enabled we `require` the require to check the version. But at that time the `NODE_ENV` isn't set yet. Then the react dev build stays in the `require.cache` that any future require of react will get the wrong build. In that case, React dev bundle is picked in production mode. Fun fact: if you're using hooks, that seem not to effect you, but context consumer works different then you couldn't get the proper context from provider. Fixes #38176 Fixes #38765 Fixes #38332 ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
17 lines
207 B
JavaScript
17 lines
207 B
JavaScript
import React from 'react'
|
|
import { useIdk } from '../context'
|
|
|
|
const Page = () => {
|
|
const idk = useIdk()
|
|
|
|
console.log(idk)
|
|
|
|
return (
|
|
<>
|
|
<p>Value: {idk}</p>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default Page
|