question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSR subscription in composeWithTracker

See original GitHub issue

Hi, I have a problem with flow-router-ssr and the composer function of react-komposer. In the composer function is a subscription of a collection.

function composer(props, onData) {
  const handle = Meteor.subscribe('collection');

  if (handle.ready()) {
    const collection = Collection.find().fetch();
    onData(null, {collection});
  }
};

export default composeWithTracker(composer)(SomePage);

This is working fine and the SSR renders the page correctly. But when the code is executed I get a “Loading…” indicator for a moment (fast-render). The problem is, that the subscription handle is not ready when it is executed for the first time.

What can I do? Is it possible to deactivate fast-render here and wait for the handle? Thank you

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18

github_iconTop GitHub Comments

1reaction
SachaGcommented, Jul 11, 2016

No I haven’t upgraded, waiting for this to be fixed first.

0reactions
sahanDissanayakecommented, Jul 11, 2016

@SachaG are you thinking of upgrading to a newer version of update ? Just double checking with you if you have upgraded or not. If you have not I’ll bite the bullet and try to upgrade 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do we need to clean up the data for Meteor subscription? #5
In the server, FlowRouter SSR knows how to deal with cleanups. ... unmounted composeWithTracker call .stop() method for each subscription I ...
Read more >
Subscription options - SSR Health
Series subscribers receive all publications in that series on the first date publications are made available to any SSR Health client, and also...
Read more >
react-komposer-native - npm
react-komposer. Let's compose React containers and feed data into components. TOC. Why; Installation; Basic Usage; API; Using with XXX.
Read more >
SSRS Subscriptions (What goes on "under the hood")
To help assist with this I put together the flow chart below that shows the process a subscription goes through, whether it's a...
Read more >
ssrcli - PyPI
Then add your SSR configuration using ssrcli and use it. For example, if you have a SSR subscription url, do: # Add a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found