woutdp / live_svelte

Svelte inside Phoenix LiveView with seamless end-to-end reactivity
https://hexdocs.pm/live_svelte
MIT License
1.2k stars 46 forks source link

Somehow hook into stores for E2E reactivity #14

Closed woutdp closed 1 year ago

woutdp commented 1 year ago

This could be cool, although maybe not needed? Worth looking into

woutdp commented 1 year ago

Stores might actually not be the correct place. Since LiveView is server side, the global state of the application should be stored on the server and passed down to the Svelte component. I might be overlooking some usecase here.

Stores do work for certain things where you want global UI state, but this should not be hooked into the reactivity. If reactivity is required there's also ways of updating the store with a computed property I believe.

For now I'll close this