v1.0.0-beta.45
Release Notes
Breaking Changes
Client-Side Navigation Callback Renamed: onHydrationUpdate → onHydrated
The callback parameter in initClient and the return value from initClientNavigation has been renamed from onHydrationUpdate to onHydrated for clarity and consistency.
Migration:
// Before
const { handleResponse, onHydrationUpdate } = initClientNavigation();
initClient({ handleResponse, onHydrationUpdate });
// After
const { handleResponse, onHydrated } = initClientNavigation();
initClient({ handleResponse, onHydrated });Prefetch Link Relation Changed: rel="prefetch" → rel="x-prefetch"
To avoid conflicts with browser-level prefetching behavior, the link relation for RSC navigation prefetching has been changed from rel="prefetch" to rel="x-prefetch".
Migration:
// Before
<link rel="prefetch" href="/about" />
// After
<link rel="x-prefetch" href="/about" />Update all <link rel="prefetch"> tags in your components to use rel="x-prefetch". The client-side navigation runtime now scans for link[rel="x-prefetch"][href] elements instead of link[rel="prefetch"][href].
Bug Fixes
Fixed Insecure Context Handling in Navigation Cache
The navigation cache now gracefully handles insecure contexts (e.g., http:// URLs) where the Cache API is unavailable. Previously, attempts to use the cache in insecure contexts could cause errors. The implementation now:
- Checks for Cache API availability before attempting to use it
- Returns
undefinedwhen the Cache API is unavailable, allowing navigation to fall back to network requests - Wraps all cache operations in try-catch blocks for additional safety
This ensures that client-side navigation works correctly in all contexts, including development environments using http:// URLs.