Created
April 19, 2017 20:44
-
-
Save klaytonfaria/67aef463743651f45388767427c6519d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var reactRoot = document.querySelector("[data-reactroot]"); | |
var instance = Object.getOwnPropertyNames(reactRoot).filter((val) => { | |
let filteredProperty = ''; | |
if (val.indexOf('__reactInternalInstance$') >= 0) { | |
filteredProperty = val; | |
} | |
return filteredProperty; | |
}); | |
instance[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment