Skip to content

Commit

Permalink
Undispatch per each use of useAsync (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: Albert Pérez <albert.perez@immfly.com>
  • Loading branch information
sonofjavascript and Albert Pérez committed Jul 2, 2020
1 parent b4e050a commit 7069dcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useAsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const useAsync = (actions, initialState = {}) => {
client.connect({ state, dispatch })

return () => {
client.dispatchs = null
client.dispatchs[id] = null
}
}, [state])

Expand Down

0 comments on commit 7069dcc

Please sign in to comment.