hb1998 / react-component-tree

React Component Viewer - A convenient way to traverse your React app in VS Code
https://marketplace.visualstudio.com/items?itemName=HabeebArul.react-component-tree
MIT License
26 stars 6 forks source link
react reactjs vscode-extension

Logo

React Component Tree

Your entire React project — At your fingertips.

Report Bug · Request Feature




This project is forked from Sapling, which is no longer under active development. We've introduced a number of core performance improvements, and will continue to add new and exciting features.


quizwall_demo


React Component Tree is a VS Code extension for React developers. As your application scales, its file structure tends to become less and less intuitive. Depending on your project architecture, your components might be organized in a completely different configuration to the component hierarchy of your React application.

Wouldn't it be nice to have instant access to a visual representation of the dependency relationships between the components in your application? How about being able to quickly reference your available props and routes with indication of conditional rendering?

With React Component Tree, you don't have to guess at the parent component of your current file anymore. React Component Tree is an interactive hierarchical dependency tree that lives directly within your VS Code IDE. Simply select a component file as the project root, and React Component Tree will build a full component tree and retrieve information about available props at any level. It also provides visual indication of Javascript syntax or import errors in your files, and shows you which components are connected to your Redux store.

Any updates you make to your files will be automatically processed and mirrored in the sidebar view. You can also navigate React Component Tree using your keyboard, putting your entire project right at your fingertips.


ReactVSCode Extension APIBabelTypeScript\ WebpackMochaChaiGithub Actions


Table of Contents

  1. Installation
  2. Getting Started
  3. Usage
  4. Contributing
  5. Creators
  6. Acknowledgements
  7. License


Installation

  1. If needed, install Visual Studio Code for Windows (7+), macOS (Sierra+), or Linux (details).

  2. Install the React Component Tree extension for Visual Studio Code from the Extension Marketplace. Search for 'React Component Tree' in the VS Code extensions tab, or click here.

  3. Once complete, you'll see React Component Tree appear in your sidebar. You can now begin using React Component Tree! Check out the Getting Started below for information on how to get started.

Getting Started

Usage

Contributing

  1. Fork the project repo.
  2. Open the react-component-tree/extension folder in your VS Code IDE.
  3. Open extension/src/extension.ts
  4. With the extension folder as your pwd, run this command: npm run watch.
  5. From the menu, click Run - Start Debugging (or press F5), and select VS Code Extension Development from the command palette dropdown. An extension development host will open in a new window.
  6. Click the React Component Tree icon on the extension development host window sidebar. To refresh the extension development host, use Ctrl+R (or Cmd+R on Mac).


Creators

Acknowledgements

License

Distributed under the MIT License. See LICENSE for more information.