You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Allows you to specify custom HTTP headers to be sent when this route is rendered during SSR. The function receives the current match context and should return a plain object of header name/value pairs.
319
+
320
+
### `head` method
321
+
322
+
- Type:
323
+
324
+
```tsx
325
+
typehead= (ctx: {
326
+
matches:Array<RouteMatch>
327
+
match:RouteMatch
328
+
params:TAllParams
329
+
loaderData?:TLoaderData
330
+
}) =>
331
+
|Promise<{
332
+
links?:RouteMatch['links']
333
+
scripts?:RouteMatch['headScripts']
334
+
meta?:RouteMatch['meta']
335
+
styles?:RouteMatch['styles']
336
+
}>
337
+
| {
338
+
links?:RouteMatch['links']
339
+
scripts?:RouteMatch['headScripts']
340
+
meta?:RouteMatch['meta']
341
+
styles?:RouteMatch['styles']
342
+
}
343
+
```
344
+
345
+
- Optional
346
+
- Returns additional elements to inject into the document `<head>` for this route. Use it to add route-level SEO metadata, preload links, inline styles, or custom scripts.
- Fine-grained control over how the router groups lazy-loaded pieces of a route into chunks. Each inner array represents a group of assets that will be placed into the same bundle during code-splitting.
0 commit comments