Skip to content

Instantly share code, notes, and snippets.

@timdorr
Created October 24, 2016 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timdorr/717351653e97f9c4749d4b54f68f4b97 to your computer and use it in GitHub Desktop.
Save timdorr/717351653e97f9c4749d4b54f68f4b97 to your computer and use it in GitHub Desktop.
Requesting a subscription to fire at a later time
class Thing extends Component {
componentWillMount() {
this.subscriptionRequest = registerSubscriber(this.handleUpdate)
}
componentDidMount() {
startListening(this.subscriptionRequest)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment