Skip to content

keep-alive and wait-for do not work together #1150

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

Closed
nkovacs opened this issue Aug 12, 2015 · 2 comments
Closed

keep-alive and wait-for do not work together #1150

nkovacs opened this issue Aug 12, 2015 · 2 comments

Comments

@nkovacs
Copy link

nkovacs commented Aug 12, 2015

http://jsfiddle.net/nkovacs/L94uaxrf/

Click "Page 1", click "Page 2", then click "Page 1" again.

Since the page1 component is cached, its compiled function is not called again, and it never emits the event.

@yyx990803
Copy link
Member

Yeah. I saw the post in Discussion - currently the idea is that we probably need a new hook (instead of compiled) that is called right before the first insertion. This hook will provide a callback and also accepts returning a Promise.

@nkovacs
Copy link
Author

nkovacs commented Aug 12, 2015

This is not really related to that, I just discovered it accidentally while looking at the code.
For the intended usage of wait-for, this could be fixed by not waiting for the event if the component is reloaded from cache. The component should have all the data it needs (though it might be stale), so there's no need to wait.

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

2 participants