Is there a possibility to access and set the state and props of an existing React component through the browser (from inside another script or through console)?
I know t
If you have the React devtools extension, you can access the React scope via your browser console with $r.
$r
First, select the component you wanna act on in the React devtools tab:
Then, use $r to act on the component, for example read state with $r.state or set state with $r.setState({ ... }) :
$r.state
$r.setState({ ... })