Toot

Written by Matthias Andrasch on 2025-01-03 at 10:40

Why can't we just use

// sharedState.svelte.js

export const searchText = $state("");

in the new #Svelte v5?

Mat Simon was so kind to explain it to me, I turned my learnings (and his answers) into a short blog post: https://dev.to/mandrasch/svelte-5-share-state-between-components-for-dummies-4gd2 Critical feedback welcome!

[#]javascript #webdev

=> More informations about this toot | View the thread | More toots from mandrasch@social.tchncs.de

Mentions

Tags

=> View svelte tag | View javascript tag | View webdev tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113763998708833522
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
263.845555 milliseconds
Gemini-to-HTML Time
0.638702 milliseconds

This content has been proxied by September (3851b).