Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/12373/head
Simon H 2 years ago committed by GitHub
parent ded3a69820
commit 770bd5497a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -294,16 +294,10 @@ In Svelte 4, when the value of an `<img src={...}>` attribute or a `{@html ...}`
<script>
import { onMount, tick } from 'svelte';
let raw_html = $state(
typeof window === 'undefined'
? '<h1>Server</h1>'
: '<h1>Client</h1>'
);
let src = $state(
typeof window === 'undefined'
? '/server.jpg'
: '/client.jpg'
);
let server = typeof window === 'undefined';
let markup = $state(server ? '<h1>Server</h1>' : '<h1>Client</h1>');
let src = $state(server ? '/server.jpg' : '/client.jpg');
onMount(async () => {
// force update

Loading…
Cancel
Save