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
In sveltejs/svelte#6750, there is a proposed change to the StartStopNotifier type of Svelte stores, which will be a breaking change for anyone creating custom stores. See the PR for details, but the short version is that if that PR is accepted and merged into Svelte, you'll need to make some small changes to your custom store to maintain Svelte compatibility, as follows:
Inside your writable function, change stop = start(set) || noop; to stop = start(set, update) || noop; in the subscribe() implementation.
Inside your derived function, change return readable(initial_value, (set) => { to return readable(initial_value, (set, update) => { and then change const result = fn(single ? values[0] : values, set); to const result = fn(single ? values[0] : values, set, update);
In your repo, the affected code appears to be in store.js.
If you have any comments about the proposed breaking change, please come leave a comment on the Svelte PR to let me know whether it would make your life easier or harder.
The text was updated successfully, but these errors were encountered:
In sveltejs/svelte#6750, there is a proposed change to the StartStopNotifier type of Svelte stores, which will be a breaking change for anyone creating custom stores. See the PR for details, but the short version is that if that PR is accepted and merged into Svelte, you'll need to make some small changes to your custom store to maintain Svelte compatibility, as follows:
writable
function, changestop = start(set) || noop;
tostop = start(set, update) || noop;
in thesubscribe()
implementation.derived
function, changereturn readable(initial_value, (set) => {
toreturn readable(initial_value, (set, update) => {
and then changeconst result = fn(single ? values[0] : values, set);
toconst result = fn(single ? values[0] : values, set, update);
In your repo, the affected code appears to be in store.js.
If you have any comments about the proposed breaking change, please come leave a comment on the Svelte PR to let me know whether it would make your life easier or harder.
The text was updated successfully, but these errors were encountered: