S
S
Stepan2021-02-14 12:48:13
Debugging
Stepan, 2021-02-14 12:48:13

How to access a variable inside a react function from the DevTools console?

There is a site on react, in the code of which there is something like this:

class App extends React.Component {
...
  clearText(){
  var v = 1
  }
}


How can I change the v variable inside the clearText function from the console ? Or how can I call this function from the console?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2021-02-14
@Rsa97

Install the React Developer Tools extension in your browser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question