We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I use a writable with createLocalStorage and then update, it updates the variable everywhere, but ignores the variable when used with @html
@html
Please check out this repo (Check out +page.svelte): https://www.sveltelab.dev/tfpbg025yxmqvpd
The text was updated successfully, but these errors were encountered:
Look like this is linked to this issue: sveltejs/svelte#8213
There is a strange behavior with SSR and Browser update, hydration of {@html} don't see to work (but later update are OK)
{@html}
You can reproduce the error without my lib:
<script> import { writable } from 'svelte/store'; // import { persist, createLocalStorage } from '@macfja/svelte-persistent-store'; import { onMount } from 'svelte'; import { browser } from '$app/environment'; const posts = [ { id: 1, content: '<span style="color:red;">Post One</span>' }, { id: 2, content: '<span style="color:blue;">Post Two</span>' } ]; const postId = writable(1); //persist(writable(1), createLocalStorage(), 'postId'); if (browser) $postId = 2 $: currentPost = posts.find((post) => post.id === $postId); /*onMount(() => { $postId = 2; });*/ </script> <h1>Post ID: {currentPost.id}</h1> <h2>{@html currentPost.content}</h2>
Sorry, something went wrong.
No branches or pull requests
When I use a writable with createLocalStorage and then update,
it updates the variable everywhere, but ignores the variable when used with
@html
Please check out this repo (Check out +page.svelte):
https://www.sveltelab.dev/tfpbg025yxmqvpd
The text was updated successfully, but these errors were encountered: