7nik
7nik
> Couldn't you just use a `$derived`, like this? > > ```js > let a = $state(0); > let b = $derived(a); > ``` No, derives are read-only (though mutable)....
> > The problem was that, after correcting the behaviour, it used the $effect internally anyway. > > It didn't. It used a derived. Initial implementation — yes, but it...
I wonder why `invalidate_inner_signals` is placed in a separate effect instead of calling it inside the selector's setter, similarly to how it was done in Svelte 4: ```js function select_change_handler()...
`setup_select_synchronization` is such, basically, since the very beginning of Svelte 5 and I'm not sure why. But I'd explore moving the logic inside the setter in hope we can recreate...
@KieranP your Svelte 4 example seems to be oversimplified and missing something important - the `$:` blocks also run during the component initialization. Also, unlike `$:`, `$effect` doesn't run on...
In a case like your one, you expect the execution order of subscribers be * store1subscriber1 * store1subscriber2 * store2subscriber1 * store2subscriber2 * store2subscriber3 * store1subscriber3 * store1subscriber4 but it...
You need to make the symbol optional `{ [stateKey]?: unknown }` but the real problem is that you cannot rid of the marker: ```js let a = $state(5); // StateProxy...
It should be recursive (it's possible) but only for POJOs. In TS, a class instance and a POJO with the same fields are the same thing, aren't they?
[A mean this case](https://www.typescriptlang.org/play/?#code/MYewdgzgLgBNCGUCmBpJBPGBeGBldAtgEYgA2AFAOQLIC0A1hpQJQDcAsAFBToAOSeKIiQAFAE4gAHugA8AFQB82GOTkwkk5GAAmEGACUkoMdpnQxASzABzADQx4YdEoD8MAN5cY3mAG0UMFYwjOggAGYwcgC6AFyCwuJSsnL+UQpcAL4wcXLMMABkHn40qBhRLnFgSABuSGIwGRycXNpGpPBiAmEArmDAUBbgMAAkJeTV8KTdSJXdxHXMs-NiTa3A7Z0wPX0DQ6NCyOOT03HmVtaLcFCWNk0A9HcwAHQvLW0dXb39g2AjJfIKI5TGaRS64A6iCTSAFNLjreAQPRyJDQDxeHxhEAgU7Xc5NHwwEBEABWcXcDhxN2sDXxPlAkGu3X6IDE5Dynk4BIJUAAFhYIE9MSBlAAiIgdEW0rkwXn8p5E4nKcnwOIimgWYAimno7wZTJcLikJCweDKfbCcgAVjYXAe3gAei5DcaYEQzWNychoJUkAB3SIo2AZG2cI2wYDuiHkT2BslbLGq8UALxF9gVcZVMBFnXg31qWqyhZDdpgjoNoZdCvBiA1yiITy9UHlJNYMDtWN4EFtjzLFdgCsMuYGtWUwAbgebxPuPadnCAA) which results in a wrong type
[It works](https://svelte.dev/playground/hello-world?version=5.33.11#H4sIAAAAAAAAA3WRQWvDMAyF_4rnDdpCSdjVTQullx13X3ZwE4UaHNvYStth8t8nJ91CS3owxu89Celz5Ea2wAX_AK0tu1iva7aEWiHUK77mjdIQuPiKHH9cyiWB9FvV3rksnEFj0o4ywJxeWYNgkNrwIlReOdyVpkTVOuuRHSzdhnzWeNuykmf5v3TrUfJNKkhHA7KKbLZlbwElwnJ184p86m3iq2qGXJ_MT-mpmWCFMq5DdlSmFmepO9jGlMnS0D3LqTLmqkklppjGGuJ4UmFMj0FKjLMJ61BZE5jvDATyaGGEK3KBvoN-_QTc44r3-GbcJxATj1Q08VgMf7gYsFAArgPlOKb6zQOo4vS-G78-DhReipyU0hxOStezxP5g3e_5TS-p9IWCXDRSB-h_AdURRxtbAgAA): ```js let name = $state('world'); export { name }; ```