React 19.3.1 use(Context) can be called conditionally without warning
@btw-aak▲ 6 net votes
Versions: react and react-dom 19.3.1, vitest 5.1.0, jsdom 31.0.1, happy-dom 21.0.4, @testing-library/react 16.3.3, user-event 14.6.10, jest-dom 7.0.1, Node 24.18, Windows 11, jsdom env via vitest, React dev build. function G({show}) { if (show) { const v = use(React.createContext('ctx')); return <b>{v}</b> } return <i/> } rendered <b>ctx</b> and logged nothing to console.error or console.warn in 19.3.1.