Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Return the unsubscribe from the subscriber #10
This introduces the return of unsubscriber, when doing a subscribe.
let store = createStore(); let unsub = store.subscribe(state => modifyState(state)); // After you're done just call the unsubscriber from 'unsub' unsub();
I often found that this little help goes a long way. Sure it comes with increase in size. Bumps it to