React hooks: get the current state, back to the future
'How to access the current state of a component from a callback triggered asynchronously?' 
Tags: react, javascript, hooks