Skip to content

Instantly share code, notes, and snippets.

@jrwebdev
Created February 13, 2019 04:54
Show Gist options
  • Save jrwebdev/6450688f27fb46c61f248de91aa6a019 to your computer and use it in GitHub Desktop.
Save jrwebdev/6450688f27fb46c61f248de91aa6a019 to your computer and use it in GitHub Desktop.
useEffect(() => {
const subscriber = subscribe(options);
return () => {
unsubscribe(subscriber)
};
}, [options]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment