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

Trackers not working as intended #25

Open
tbelmar opened this issue Nov 15, 2022 · 4 comments
Open

Trackers not working as intended #25

tbelmar opened this issue Nov 15, 2022 · 4 comments

Comments

@tbelmar
Copy link

tbelmar commented Nov 15, 2022

Hey!

I'm working on a meteor project that makes use of zodern/melte's $m functionality. We use Meteor sessions to set and get information about toasts so the app can appropriately display them. We have the following reactive block, which from my understanding should keep track of when the session variables change, but does not.

image

This reactive block does not run when the session variables change as intended.

When I change the reactive block to a Tracker.autorun block, it works completely fine and as intended. My understanding was that $m and Tracker.autorun should have the exact same behavior.

Additionally, if I self-reference the above variables like so it also fixes the issue:
image

It's worth pointing out that this has happened in other places in our app, namely with subscriptions to Meteor publications, but this was the simplest example I could come by.

These reactive blocks were not causing this issue a couple of months ago (I remember them working around the middle of September, but I'm unsure of when they stopped working).

Please let me know if you need any more information. Thanks!

@tosinek
Copy link

tosinek commented Nov 30, 2022

Same issue for me. I am migrating a Blaze app (maybe that is important to say?). At first it was working fine I think, but eventually the reactivity stopped working. Zodern told me to investigate the transpiled code in .meteor/local/build/programs/web.browser/app/app.js . I haven't had time to do it yet. Re-referencing the variable in the block helps. I ended up using svelte-meteor-data's useTracker instead (not as nice syntax though).

@tosinek
Copy link

tosinek commented Dec 4, 2022

Removing svelte-meteor-data seems to be fixing the issue. Could you please try that?

@csellis
Copy link

csellis commented Mar 2, 2023

Removing svelte-meteor-data seems to be fixing the issue. Could you please try that?

This worked for me. 👍
meteor remove rdb:svelte-meteor-data

@vpalos
Copy link

vpalos commented Jun 8, 2023

Also confirming that this works for me!

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

No branches or pull requests

4 participants