Skip to content

Commit

Permalink
Remove onStateChange from subscription when unsubscribing
Browse files Browse the repository at this point in the history
Co-Authored-By: Mark Erikson <mark@isquaredsoftware.com>
  • Loading branch information
mpeyper and markerikson committed Aug 19, 2019
1 parent 4734a71 commit 67e873d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function Provider({ store, context, children }) {
}
return () => {
subscription.tryUnsubscribe()
subscription.onStateChange = null
}
}, [contextValue, previousState])

Expand Down

0 comments on commit 67e873d

Please sign in to comment.