Toot

Written by 🇦🇶 Placebo Domingo on 2024-11-08 at 14:12

💡 I discovered an interesting quirk in #Svelte 5 when using the $state rune to store an object.

Simple objects are reactive, but class instances are not.

So how do you get class instance properties to be reactive?

Here's my solution 👇

https://chasingcode.dev/blog/svelte-5-state-rune-class-vs-object-reactivity/

=> More informations about this toot | View the thread | More toots from brbcoding@indieweb.social

Mentions

Tags

=> View svelte tag

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

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