src/helpers/helpers.js
// THIS RETURNS THE ACTUAL REACT ELEMENT USING DOM ID
THIS RETURNS THE ACTUAL REACT ELEMENT USING DOM ID
THIS RETURNS THE ACTUAL REACT ELEMENT USING DOM ID
function findReact(domId) {
	var dom = document.getElementById(domId);
	let key = Object.keys(dom).find((key) => key.startsWith("__reactInternalInstance$"));
	let internalInstance = dom[key];
	if (internalInstance == null) return null;
	if (internalInstance.return) {
		return internalInstance._debugOwner ? internalInstance._debugOwner.stateNode : internalInstance.return.stateNode;
	} else {
		return internalInstance._currentElement._owner._instance;
	}
}
function findReact ( domId ) { var dom = document . getElementById ( domId ) ; let key = Object . keys ( dom ) . find ( ( key ) => key . startsWith ( "__reactInternalInstance$" ) ) ; let internalInstance = dom [ key ] ; if ( internalInstance == null ) return null ; if ( internalInstance . return ) { return internalInstance . _debugOwner ? internalInstance . _debugOwner . stateNode : internalInstance . return . stateNode ; } else { return internalInstance . _currentElement . _owner . _instance ; } }
THIS RETURNS THE ACTUAL REACT ELEMENT USING DOM ID
THIS RETURNS THE ACTUAL REACT ELEMENT USING DOM ID
// react 16+ // react <16