as
option to render the component as a different element (#271).preserveState
default to be based on the method (#263).href
) for GET
requests (#264).Inertia now shows a console warning if you create an Inertia link that uses a method other than GET
and you also don't change the link element to something other than an <a>
tag. 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 new as
option to set a more appropriate element, such as a <button>
. For example:
- <InertiaLink href="/logout" method="post">Logout</InertiaLink>
+ <InertiaLink href="/logout" method="post" as="button" type="button">Logout</InertiaLink>
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.