hardStudy question · answer published in React interview questions, so no pointsreactreact-19suspense
use() that suspends forever
This client component keeps showing the Suspense fallback and refetches in a loop. Why?
function Orders() {
const orders = use(fetch("/api/orders").then((r) => r.json()))
return <List items={orders} />
}Discussion 0
Join free to post in the discussion.
Related questions
- Why React lists need keysFrontend Developer
- Input that ignores typingFrontend Developer
- Changing a prop inside a childFrontend Developer
- What JSX turns intoFrontend Developer
- A component written in lowercaseFrontend Developer
- Adding a CSS class in JSXFrontend Developer
- Returning two elementsFrontend Developer
- A stray 0 on the pageFrontend Developer