-
Notifications
You must be signed in to change notification settings - Fork 413
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
Helpers maintain reactivity after region change in before hook. #847
Comments
Ok, the repro is even simpler and can work with a simple session variable too. @cmather are we now delaying a flush before rendering or something? |
Thanks Tom I'll try to take a look. Is this issue actually specifically related to auth? Or is it a deps issue with helpers running again when they shouldn't? What's the expected behavior vs actual behavior?
|
Hey @cmather - take a look at the second commit in the project, it's a very simple reproduction w/ just a Session var. It's a deps issue with helpers running when they shouldn't. In short:
In my two examples, A is either "being logged out" or "a Session var is |
@cmather so I debugged and thought about it a little more. It's actually a bug with I:DT I guess. I can make a simple reproduction / issue against that if you'd like to simplify it. Basically the picture looks like this:
Now, when
Does that make sense? I can definitely write it down in code if it'll be easier to understand :) |
Thanks for this detailed breakdown tom. I wonder is there a way to manually stop reactivity on the rendered template if we know we're going to replace it anyway. So when the template value computation invalidates we call stop or something on the underlying template view but not the enclosing region view. Hmm
|
Something like?:
|
@cmather do you want me to do this? |
@cmather - I can't remember where we got to with this? |
I don't think we can currently solve this problem with Blaze. We need a way to stop computations on a view somehow. And I'm not sure how to do it without destroying the view each time. |
@cmather - and why can we not do that? (i.e. call |
Hmm maybe that would work. Want to give it a try? I need to work through the details though. Not completely sure that will work. |
I think maybe we leave this one till post 1.0 ? It seems dangerous and not a big enough problem to give ourselves unnecessary headaches right now. |
Yep
|
Hey guys, is this still in your roadmap to fix? Thanks! |
Am I missing something here? I'm surprised this hasn't come up more often:
Repro https:/tmeasday/IR-logout :
Meteor.user().something
in a helper.Occurs in both IR 0.9.3 and 1.0.0-pre2
The text was updated successfully, but these errors were encountered: