Skip to content

Instantly share code, notes, and snippets.

@aleclarson
Created October 17, 2015 00:47
Show Gist options
  • Select an option

  • Save aleclarson/7cbd136304db76db7064 to your computer and use it in GitHub Desktop.

Select an option

Save aleclarson/7cbd136304db76db7064 to your computer and use it in GitHub Desktop.
TimerMixin
TimerMixin = require "react-timer-mixin"
combine = require "combine"
steal = require "steal"
hook = require "hook"
module.exports = (descriptor) ->
methods = combine {}, TimerMixin
willUnmount = steal methods, "componentWillUnmount"
hook.after descriptor, "componentWillUnmount", willUnmount
combine descriptor, methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment