-
Notifications
You must be signed in to change notification settings - Fork 192
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
SSR not waiting for data #431
Comments
This is a custom publication. So, you need to call sub.ready() after initial set of data has been added. If that doesn't worked out, try to create a sample repo and send it. You can fork and use my hello-meteor-react project. |
Sorry, I didn't show all the code. I am calling sub.ready(). I'll see if I can create the repo. |
Hi, As requested, here's a repo: https://github.com/timothyarmes/hello-react-meteor With JS turned on it works as before. With it turned off there's no published data. Regards, Tim |
I'll check this. On Mon, Nov 30, 2015 at 1:25 PM timothyarmes [email protected]
|
Yep. I think there is an issue here with custom publications. |
Had a bug in FastRender and fixed it. Try updating to the latest version of flow-router-ssr (v3.7.0) |
Thanks, that's fixed it. |
Hi,
My
getMeteorData()
looks something like this:Rendering on the client works correctly, however on the server the result is always empty, so the SSR rendered data is null.
The publish code is slightly unusual in that I'm using an aggregation and pushinh the results to the collection manually:
Here I can see that the items are successfully added to the subscription before the call to subscribe returns, so the console looks like this:
Why is the result of the find still empty?
I've noticed when doing SSR that components aren't rerendered with the results of async callbacks, so I assume that FlowRouter is waiting for data from any subscriptions before allowing the rendered to happen. Is my unusual subscription causing an issue?
Tim
The text was updated successfully, but these errors were encountered: