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
=> View svelte tag | View javascript tag | View webdev tag This content has been proxied by September (3851b).Proxy Information
text/gemini