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 | More toots from mandrasch@social.tchncs.de
@mandrasch State management is a recurring topic that reminds of why I enjoy things like Livewire or Inertia.js, as there the only thing that matters is the backend's state. :)
=> More informations about this toot | More toots from mariohamann@indieweb.social
@mariohamann πPlayed around with Livewire & Inertia a bit in the past, very interesting. Would have liked to experience it in a real world project, but no jobs out there unfortunately.
For hobby projects, static site generation is imho very helpful with SvelteKit = easy and cheap deployment anywhere. Opt-in for SSR only if needed.
And it's always an option to use Svelte / Vue / etc. within PHP CMSes for very interactive stuff. Like in journalism, where you don't need backend state.
=> More informations about this toot | More toots from mandrasch@social.tchncs.de
@mariohamann Matthias Stahl from newspaper SPIEGEL does a lot of stuff with Svelte, so it's more about reactive UI state https://youtube.com/@h_i_g_s_c_h_videos?si=Dr7vvfP9EzhrIVXa
=> More informations about this toot | More toots from mandrasch@social.tchncs.de
π€ Tracking strings detected and removed!
π Clean URL(s):
https://youtube.com/@h_i_g_s_c_h_videos
β Removed parts:
?si=Dr7vvfP9EzhrIVXa
=> More informations about this toot | More toots from c558c7cc69bbda3c271782b736babc64acd2da258b14f356dbca966cb0b7b89e@mostr.pub This content has been proxied by September (3851b).Proxy Information
text/gemini