@@ -18,8 +18,9 @@ module.exports = function useUppy (factory) {
useEffect(() => {
return () => {
uppy.current.close({ reason: 'unmount' })
+ uppy.current = undefined
}
- }, [])
+ }, [uppy])
return uppy.current