Poll: Here's how people deal with Subscriptions with React


#1
  • I put my static subscriptions inside createContainer, and know that meteor’s subs management is smart enough not to unsub-resub.
  • I put my static subscriptions in a global file and export a reactive var, and then use Tracker inside of componentWillMount to manually set the component’s state upon changes.
  • I put my subscriptions in componentWillMount, and use Tracker inside of this function to manually set the component’s state upon changes.

0 voters


#2

So, this week we have 4 polls.

Option 3 for gaining absolute control over what should change inside component. Anyway it should be componentDidMount.