Skip to content

Commit c419a3a

Browse files
Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
1 parent af40545 commit c419a3a

File tree

1 file changed

+9
-7
lines changed
  • src/content/docs/en/guides/upgrade-to

1 file changed

+9
-7
lines changed

src/content/docs/en/guides/upgrade-to/v6.mdx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ const integration = () => {
283283

284284
<SourcePR number="14462" title="feat: clean deprecated APIs"/>
285285

286-
In Astro 4.0, the `app.render()` signature allowing to pass `routeData` and `locals` as optional arguments was deprecated in favor of a single optional `renderOptions` argument.
286+
In Astro 4.0, the `app.render()` signature that allowed passing `routeData` and `locals` as optional arguments was deprecated in favor of a single optional `renderOptions` argument.
287287

288288
Astro 6.0 removes this signature entirely.
289289

@@ -302,13 +302,13 @@ app.render(request, { routeData, locals })
302302

303303
<SourcePR number="14462" title="feat: clean deprecated APIs"/>
304304

305-
In Astro 4.0, the `handleForms` prop of the `<ClientRouter />` component was deprecated.
305+
In Astro 4.0, the `handleForms` prop of the `<ClientRouter />` component was deprecated, as it was no longer necessary to opt in to handling `submit` events for `form` elements. This functionality has been built-in by default and the property, if still included in your project, silently had no impact on form submission.
306306

307-
Astro 6.0 removes this prop entirely, as it had no impact on form submission anymore.
307+
Astro 6.0 removes this prop entirely and it now must be removed to avoid errors in your project.
308308

309309
#### What should I do?
310310

311-
Remove the `handleForms` property from your `<ClientRouter />` component. It is no longer necessary.
311+
Remove the `handleForms` property from your `<ClientRouter />` component if it exists. It has provided no additional functionality, and so removing it should not change any behavior in your project:
312312

313313
```astro title="src/pages/index.astro" del="handleForms"
314314
---
@@ -330,13 +330,15 @@ import { ClientRouter } from "astro:transitions";
330330

331331
<SourcePR number="14462" title="feat: clean deprecated APIs"/>
332332

333-
In Astro 4.8.4, the `with` option of the programmatic `prefetch()` function was deprecated.
333+
In Astro 4.8.4, the `with` option of the programmatic `prefetch()` function was deprecated in favor of a more sensible default behavior that no longer required specifying the priority of prefetching for each page.
334334

335-
Astro 6.0 removes this option entirely, defaulting to `link` preloading.
335+
Astro 6.0 removes this option entirely and it is no longer possible to configure the priority of prefetching by passing the `with` option. Attempting to do so will now cause errors.
336+
337+
By default, Astro's prefetching now uses an automatic approach that will always try to use `<link rel="prefetch>` if supported, or will fall back to `fetch()`.
336338

337339
#### What should I do?
338340

339-
Review your `prefetch()` calls and remove the `with` option:
341+
Review your `prefetch()` calls and remove the `with` option if it still exists:
340342

341343
```ts
342344
prefetch('/about', { with: 'fetch' });

0 commit comments

Comments
 (0)