Diagram showing the detection of if click happened inside or outside of React component by checking clickCapture’s value when mousedown event reaches document