mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
**Current:** 1. https://github.com/vercel/next.js/pull/92011 **Up next:** 2. https://github.com/vercel/next.js/pull/92012 --- When a navigation, server action, or prefetch fails due to a network error, instead of falling back to MPA navigation or surfacing an error, the request blocks until connectivity is restored and then retries automatically. Offline detection works by treating any `fetch()` rejection as a network error (server errors resolve with a status code, they don't reject). Once offline, a polling loop does HEAD requests with exponential backoff to detect when connectivity returns. Browser offline/online events also feed into this loop. Successful fetches from other code paths can short-circuit the loop if they happen to land first. Follow-up work will add a `useOffline` hook so apps can show an offline indicator to the user, and allow navigations to read from stale cache entries while offline. Gated behind `experimental.useOffline`.
11 lines
237 B
TypeScript
11 lines
237 B
TypeScript
import { LinkAccordion } from '../components/link-accordion'
|
|
|
|
export default function Home() {
|
|
return (
|
|
<div id="home">
|
|
<h1>Home</h1>
|
|
<LinkAccordion href="/destination">Destination page</LinkAccordion>
|
|
</div>
|
|
)
|
|
}
|