Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since 3.16.x store subscriptions don't seem to work at all if value is changed within an action #4094

Closed
antony opened this issue Dec 11, 2019 · 1 comment · Fixed by #4095

Comments

@antony
Copy link
Member

antony commented Dec 11, 2019

Describe the bug
Apologies for the terrible naming. I discovered this bug when my site broke, and after trying to discover a workaround, I think the problem is worse than I initially thought.

It seems that since 3.16.x, store auto subscriptions are quite broken, if their value is updated by an action.

To Reproduce
@dkondrad has a simplified example here which doesn't work all the way back to 3.10.x:

https://svelte.dev/repl/4a75f39e16c44fccb48104e857d21a50?version=3.16.3

Expected behavior
Stores should be autosubscribed and values updated when they change.

Information about your Svelte project:

  • Svelte version 3.16.3, 3.16.2, 3.16.1

Severity
Severe. I can't find a workaround for this, and it appears that auto-subscriptions are completely broken.

Additional Notes

I don't know if this relates to #4081 - but it seems suspect.

@antony antony changed the title Since 3.16.x store autosubscriptions only work within if statements. Since 3.16.x store autosubscriptions don't seem to work at all. Dec 11, 2019
@antony antony changed the title Since 3.16.x store autosubscriptions don't seem to work at all. Since 3.16.x store autosubscriptions don't seem to work at all if value is changed within an action Dec 11, 2019
@antony antony changed the title Since 3.16.x store autosubscriptions don't seem to work at all if value is changed within an action Since 3.16.x store subscriptions don't seem to work at all if value is changed within an action Dec 11, 2019
@ghost
Copy link

ghost commented Dec 11, 2019

Still broken with this repl:
https://svelte.dev/repl/5239a903de1b401f92113318dcb344cc?version=3.16.4

Seems action is triggered after the update, though that's exactly what the docs say so not sure if really should even work in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant