You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to suggest a proposal to extend the usage of the signals-core library to the Svelte framework.
I mean an implementation of a Svelte's store contract, which is about a subscribe method:
So, the signals would need to have an additional subscribe method that returns a function that lets you unsubscribe.
The Nanostore library does exactly that: https://github.com/nanostores/nanostores#svelte, so developers can use atoms without any dedicated adapter.
I'm sure the advantages of the ability to subscribe to a certain signal would exceed the Svelte support.
The text was updated successfully, but these errors were encountered:
kolodziejczak-sz
changed the title
Extend a signal API to match a svelte store contract
Extend a signal API to match the Svelte store contract
Sep 7, 2022
First of all, thank you for the library!
I'd like to suggest a proposal to extend the usage of the
signals-core
library to the Svelte framework.I mean an implementation of a Svelte's store contract, which is about a
subscribe
method:So, the signals would need to have an additional
subscribe
method that returns a function that lets you unsubscribe.The
Nanostore
library does exactly that: https://github.com/nanostores/nanostores#svelte, so developers can useatoms
without any dedicated adapter.I'm sure the advantages of the ability to subscribe to a certain signal would exceed the
Svelte
support.More info about Svelte's stores can be found here:
https://svelte.dev/docs#run-time-svelte-store
https://github.com/sveltejs/svelte/blob/master/src/runtime/store/index.ts
Thanks
The text was updated successfully, but these errors were encountered: