-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
page data store now runes state #47
Comments
is there a way to get past this? |
@hgoona It actually still works, you just gotta import the old page store and ignore the deprecation warnings: <script lang="ts">
// Using both the new page from app state for other things and old one for flash messages.
import { page } from '$app/state';
import { page as pageStore } from '$app/stores';
const flash = getFlash(pageStore);
</script>
{#if $flash}
<div>{$flash.message}</div>
{/if} Caveat: if you are setting flash messages on the server before a redirect you will get taken to an error page for a split second before the redirect kicks in. I assume this is due to the Svelte 4 to 5 migration. It's a little annoying but I'm ok with it for now... |
If there's a way to detect which one of the stores are used at runtime, I could add a compatibility fix. |
With 2.4.5 it should now be possible to use |
@ciscoheat Working great with Svelte 5. |
The stores expected in sveltekit-flash-message as parameters are writable stores and page store is now a runes store. this will need updating.
The text was updated successfully, but these errors were encountered: