DEV Community

Discussion on: Difficulties Encountered with React Hooks

Collapse
wolfhoundjesse profile image
Jesse M. Holmes • Edited on

Does returning a callback function for cleanup not work in your case?

useEffect(() => {
  // do something
  return () => yourCleanupHere()
})
Collapse
vuesomedev profile image
Gábor Soós

Missed that feature, thanks for letting me know.