From f78d0f0b341ef0c7c344de784f41fee2ce4ba139 Mon Sep 17 00:00:00 2001 From: Joe Krump Date: Tue, 14 Nov 2023 22:11:28 -0500 Subject: [PATCH] Update remembering-state.jsx Update the svelte code snippet for manually saving state. `@inertiajs/svelte` does not export `router` and `@inertiajs/core` does, so I've updated the snippet to import from `@inertiajs/core`. Perhaps `@inertia/svelte` should expose `route`, however, this change is focused on keeping the docs accurate. --- resources/js/Pages/remembering-state.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/Pages/remembering-state.jsx b/resources/js/Pages/remembering-state.jsx index c5016a37..0a9ad2fa 100644 --- a/resources/js/Pages/remembering-state.jsx +++ b/resources/js/Pages/remembering-state.jsx @@ -366,7 +366,7 @@ export default function () { name: 'Svelte', language: 'js', code: dedent` - import { router } from '@inertiajs/svelte' + import { router } from '@inertiajs/core' // Save local component state to history state... router.remember(data, 'my-key')