inertia-svelte@0.5.0

Published on October 20, 2020

Changes

  • Update Inertia link preserveState default to be based on the method (#263).
  • Update Inertia link to merge data into the URL query string (href) for GET requests (#264).

Deprecations

Inertia now shows a console warning if you create an Inertia link that uses a method other than GET. This is due to accessibility issues that come with using anchor links for non-GET requests, which you can read more about here: #268.

To hide this console warning, use the inertia directive instead to set a more appropriate element, such as a <button>. For example:

- <InertiaLink href="/logout" method="post">Logout</InertiaLink>
+ <button use:inertia={{ method: 'post', href: '/logout' }} type="button">Logout</button>

Breaking changes

This release depends on changes made to the internals of Inertia, which requires updating @inertiajs/inertia to ^0.5.0. The peer dependencies have been updated to reflect this.