docs: fix typos (#13752)

- remove copy pasted argument from $set
- fix typo
pull/13760/head
brunnerh 2 weeks ago committed by GitHub
parent d1cac703c0
commit ef205d960e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -525,7 +525,7 @@ For `$set`, use `$state` instead to create a reactive property object and manipu
import App from './App.svelte' import App from './App.svelte'
---const app = new App({ target: document.getElementById("app"), props: { foo: 'bar' } }); ---const app = new App({ target: document.getElementById("app"), props: { foo: 'bar' } });
app.$set('event', { foo: 'baz' });--- app.$set({ foo: 'baz' });---
+++const props = $state({ foo: 'bar' }); +++const props = $state({ foo: 'bar' });
const app = mount(App, { target: document.getElementById("app"), props }); const app = mount(App, { target: document.getElementById("app"), props });
props.foo = 'baz';+++ props.foo = 'baz';+++
@ -850,7 +850,7 @@ In Svelte 4, `null` and `undefined` were printed as the corresponding string. In
Previously, bindings did not take into account `reset` event of forms, and therefore values could get out of sync with the DOM. Svelte 5 fixes this by placing a `reset` listener on the document and invoking bindings where necessary. Previously, bindings did not take into account `reset` event of forms, and therefore values could get out of sync with the DOM. Svelte 5 fixes this by placing a `reset` listener on the document and invoking bindings where necessary.
### `walk` not longer exported ### `walk` no longer exported
`svelte/compiler` reexported `walk` from `estree-walker` for convenience. This is no longer true in Svelte 5, import it directly from that package instead in case you need it. `svelte/compiler` reexported `walk` from `estree-walker` for convenience. This is no longer true in Svelte 5, import it directly from that package instead in case you need it.

Loading…
Cancel
Save