Blog posts tagged "react"

Hero image for post Accessing React state in your component cleanup with hooks
Accessing React state in your component cleanup with hooks

I came across an interesting problem where I needed to access a piece of React state when unmounting a component, a problem that would have been trivial with Class components and componentWillUnmount, however with hooks, the solution was less clear.