-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
observable is not working when placed inside a function #3806
Comments
You need to mark your component as an observer somehow. Do you use this package https://github.com/xelaok/svelte-mobx? I believe it’s better to address it there, since the Mobx organization doesn’t maintain any Svelte integration. |
How to mark my component as observer? And no, i did not use I just confused that if my observable is wrapped inside a function and then return it, the reactive suddenly doesn't work. Of course i can use |
If you observe any kind of reactivity in your templates, it's not provided by |
I want to make an indirection of url query state using mobx in svelte. i try to make it like this
and call it with this
i have a reactive counter on the html, and then
the problem is, the
{urlState.value}
is not reflecting the counter variable. but, when i change the{urlState.value}
to{url.value}
, the value is changed each updateIntended outcome:
the
{urlState.value}
will reflect the counter variableActual outcome:
the
{urlState.value}
is not reflecting the counter variable. even with as simple as this was not working eitherHow to reproduce the issue:
use the following function
Versions
6.12.10
The text was updated successfully, but these errors were encountered: