Reactjs – Stale state inside an event handler
I have a JS library (Cytoscape) inside my React component. The library need to be handled events with set event handler functions (on diagram/ component initilazation). The problem is that inside these events the state is stale - it only…