I am working on setting up Fastboot for my project. I have it pretty much all working as expected with minor changes to the app. I noticed that I was seeing my page render from Fastboot, and then when the JS booted up I was seeing the loading route activated and then the page rendered again.
I know the way to get around this is using the shoebox, so the model promise resolves immediately. Then the app won’t go into the loading route. So I implemented the shoebox and have my store data transferred to the web app. That works great, and I have confirmed the data is there.
But then I ran into another problem. Im using store.query instead of store.findAll because Im paging the results via the server.
To give an example, lets say I go to the /users page.
- Users html is returned from fastboot (with the shoebox having the first 10 users)
- App boots up, and goes to the /user route
- App makes the store.query api call, since querying disregards the data in the store (even though the first 10 records are indeed in the store)
- Loading route is now activated and page clears out
- Model is resolved and data is displayed again.
Has anyone ran into this before? Any solutions on how to get around/solve this?