Closed nelsonjchen closed 4 years ago
I'm giving it a shot in a fork, I'll let you know...
ah, this works: https://stackoverflow.com/questions/49541235/how-to-get-content-of-redux-store-in-console-without-devtools
Use "root" instead of "react-root"
Gotta sleep now, but have a chrome extension started for ya in https://github.com/khusmann/HackyZoomBreakoutBot
Cool, I'll take a look.
Got the store -- make a zoom room and try
document.getElementById('root')._reactRootContainer._internalRoot.current.child.pendingProps.store.getState()
in the console :)
Good stuff!
On Wed, Aug 26, 2020 at 8:31 PM Kyle Husmann notifications@github.com wrote:
Got the store -- make a zoom room and try
document.getElementById('root')._reactRootContainer._internalRoot.current.child.pendingProps.store.getState()
in the console :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nelsonjchen/HackyZoomBreakoutBot/issues/2#issuecomment-681322806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABJ425XRHHHDZKL7M7MQLSCXHSFANCNFSM4QMPR6GA .
The google searches for that approach are amusing. The top result for me is a sneakerhead Discord bot SAAS's setup for some ecommerce site: https://glare.vip/ow . Wild!
I'll put that in for now. As for the extensionization, I think I'll work on that off-master
in another branch. I'll put your commit in there, strip the README.md
so the broken image links aren't in my face, create an issue, and work from there.
How can we get the props from a production React app without Dev Tools?
Suggested by @khusmann: https://stackoverflow.com/questions/29321742/react-getting-a-component-from-a-dom-element-for-debugging