Day 2, Segment 2

In notebook:
FrontEndMasters React Intro 2
Created at:
2016-12-27
Updated:
2016-12-27
Tags:
libraries React JavaScript

React tools

Debugging React. The ideal tool is React Developer Tools. They no longer have one for Safari. Firefox and Chrome mostly. 
It adds a React tab. He uses Firefox Nightly. Needed to restart the browser. 
It gives a DOM explorer for React. BrowserRouter has lots of layers that you have to click through. Eventually you arrive in Matches then in Landing. You can observe the props, params, location available in the component. 

You can also do right click and inspect element that takes you to the component. 

You can modify the ​state​ in the inspector

Then the DOM updates immediately.

Access selected React element as $r in the console

Then you can use it in the console tab. eg.: ​$r.state​ will print out the state of the element in the console.