Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardReactuse() in renderSingle-choice MCQ

Unlike hooks, `use()` can be called conditionally and inside loops. What property of `use()` makes this safe with respect to React's reconciliation and the rules of hooks?

function Comments({ commentsPromise }) { if (someFlag) { const comments = use(commentsPromise); return <List items={comments} />; } return null; }