React Sight
|Updated:
11 Dec 2020
|2870 Stars
Visualization tool for React, with support for Fiber, Router (v4), and Redux
Categories
Overview
React Sight is a tool that provides a live view of the component hierarchy tree of React applications, complete with support for React Router and Redux. It offers a visual representation of the structure of the app to help developers understand how components are organized without modifying any existing code. The tool is available as a Chrome extension and now also supports Firefox.
Features
- Live Component Hierarchy: Visual representation of the component hierarchy tree.
- Support for React Router and Redux: Includes support for React Router and Redux components.
- Interactive Node Information: Hover over nodes to view their state and props in a side panel.
- Built-In Filters: Hide DOM elements, Redux components, and Router components for better focus.
- Zoom Functionality: Zoom in by double-clicking, zoom out by Shift + double-clicking.
- Easy Installation: Simple setup process requiring only the installation of a Chrome extension.
Installation
Chrome Extension
- Add React Dev Tools to Chrome.
- Install React Sight from the Chrome Web Store.
- Ensure “Allow access to file URLs” is enabled in the extension settings for React Dev Tools and React Sight.
- Open Chrome Developer Tools (cmd+opt+j) and access the React Sight panel.
Firefox Add-on
- Add React Dev Tools to Firefox.
- Install React Sight from the Firefox Add-ons website.
- Follow similar setup steps to the Chrome extension.
Building Your Version
- Clone the repository and install dependencies using
yarn install
or npm install
. - Generate the build with
yarn build
. - For Chrome, load the unpacked extension from the
~/ReactSight/build/extension
folder. - For Firefox, load the extension as a “Temporary Extension” using the
manifest.json
file.
Summary
React Sight offers a convenient way for developers to visualize the component hierarchy of React applications, supporting React Router and Redux components. Its easy installation process via Chrome and Firefox extensions makes it accessible for developers wanting to gain insights into their application structure without needing to modify existing code.