How can I test a functional component method with React Developer Tools?

Viewed 65

With Class components you could use React Developer Tool, select the component in the ⚛️ Components dev tools tab, and test any of its method using $r.methodName() in the console.

When I try the same with Functional components, I get Uncaught TypeError: $r.methodName is not a function.

Is there a way to test a functional component method from the browser console using React Dev Tools?

0 Answers
Related