Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardReactrender bailout Object.isSingle-choice MCQ

In React's render bailout, useState uses Object.is to compare the new state to the old. Given the snippet, how many times does the child re-render after the effect runs once?

function Child() { const [v, setV] = useState(NaN); useEffect(() => { setV(NaN); }, []); console.log('render'); return <span>{String(v)}</span>; }