How to do it…

We got the standalone tool; let's see how to use it. In order to use the RDT in a standalone fashion, you'll have to add a single line at the top of your HTML code.

<!DOCTYPE html>
<html lang="en">

<head>
<script src="http://192.168.1.200:8097"></script>
.
.
.

Then start the application normally, and after it's up and running, start the standalone app. You'll get something like the next screenshot. Note that we are seeing two separate windows: one with the RDT, and the other with the application (for variety) in Opera; in the same way I could have used Safari or IE or any other browser:

 The standalone RDT let you inspect React applications even if they are running in browsers other than Chrome or Firefox

Now you are really set to go; let's finish this section by seeing what we can (and cannot) do.

For more details on how to configure the standalone application, in particular, if you need to use a different port, check out the official documentation at https://github.com/facebook/react-devtools/tree/master/packages/react-devtools. For complicated cases, you may end up using a different package, react-devtools-core, over at https://github.com/facebook/react-devtools/tree/master/packages/react-devtools-core.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset