DevTools Tips

Quickly reference React components in the console

Zee shared a great tip on Twitter if you are working with React and have the React DevTools extension installed.

You can use $r in the Console tool to reference the currently selected element in the React DevTools. This is a great way to quickly inspect the props and state of a component.

The React DevTools components panel in DevTools, and Console below it, showing the result of $r