Comments (8)
Thanks Tom. It would be helpful to see the route or controller definition to see where the reactivity is being set up. This situation should be accounted for when you run the new route it should invalidate the previous computation which would prevent the previous route from rendering again. Even if the data comes off the wire in the middle of the next route run, the invalidation wouldn't fire until the new route has completely run since its all synchronous. And at that point the previous computation will have been torn down. But you may have discovered a case I didn't test for. I have basically the same code above in evmind though and seems to work fine. I can trace in the debugger sometime today to make sure.
from iron-router.
Hey Chris. Still up!
Let me make a repro before you think about it. I'll get into it tomorrow.
El 03/08/2013, a las 12:38 AM, Chris Mather [email protected] escribió:
Thanks Tom. It would be helpful to see the route or controller definition to see where the reactivity is being set up. This situation should be accounted for when you run the new route it should invalidate the previous computation which would prevent the previous route from rendering again. Even if the data comes off the wire in the middle of the next route run, the invalidation wouldn't fire until the new route has completely run since its all synchronous. And at that point the previous computation will have been torn down. But you may have discovered a case I didn't test for. I have basically the same code above in evmind though and seems to work fine. I can trace in the debugger sometime today to make sure.
—
Reply to this email directly or view it on GitHub.
from iron-router.
Thanks @tmeasday. I just wrapped up for the day. Finally got EventedMind deployed! Plan is to take a little breather and then get to the router again this weekend. I'll look at this issue too, but interested if you discover any other symptoms around it.
from iron-router.
Ok, created a reproduction, pretty simple and standard use case:
https://github.com/tmeasday/route-data-bug
To reproduce:
- Start meteor server
- In console, do
Posts.insert({});
- Click on the word 'one'.
- You should be at
/two
but still see theone
template.
I would expect at 4. to see the two
template rendered.
I also tried to make a failing bug that suffered the same issue (https://github.com/tmeasday/meteor-iron-router/compare/EventedMind:add-templateName-to-partial...async-data-bug) but I couldn't figure out how to make it happen. I guess it's a question of exactly when the data
callback is re-run due to the server returning data.
Will investigate more tomorrow and see if I can find out more.
from iron-router.
Thanks Tom. Will investigate this morning.
from iron-router.
I was able to reproduce this. It appears something unexpected is happening in the onRun
method of ClientRouter. Will resume debugging tonight.
from iron-router.
@tmeasday, that was a bit of a tricky one. Nice find. Also discovered another minor bug while I was in there that I fixed. See my commit message for a full explanation.
from iron-router.
In this fix did you move the rendering of the new route into a separate Deps flush?
Because I'm seeing the transitioner's computation invalidate twice on routing -- firstly as the context (i.e. URL) changes and then secondly as the partial changes. Here's my workaround for now, but I think maybe this tight couple indicates I should follow an approach more like what you outlined tmeasday/iron-transitioner@b7de1aa
from iron-router.
Related Issues (20)
- abort unload HOT 1
- Meteor, Iron router: Render makes the page to shake
- Parameters can't have *s in them
- post to serverside route forces client to the posts action url HOT 1
- undefined routes terminate web socket connection
- Iron router Issue with spiderable HOT 4
- can be read from a controller, variables from another controller?
- Defining routes using arrow functions doesn't work HOT 1
- Path name with '/' inside it... HOT 1
- Request entity too large error
- Errors prevented startup: W
- meteor iron:router not working HOT 1
- Dynamic Imports with Iron Router HOT 10
- Able users to save audio files for offline viewing HOT 2
- How to use pathFor have id like {{pathFor route='index.resource.show'}}/{{data._id}} HOT 2
- Subscription lost after a few minutes HOT 1
- Supporting newer versions of Meteor with compat packages
- ERR_OUT_OF_RANGE
- why async, promise?
- Source for iron-router 1.2.0? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iron-router.