GithubHelp home page GithubHelp logo

react-scope / react-scope Goto Github PK

View Code? Open in Web Editor NEW
311.0 12.0 18.0 581 KB

Visualize your React components as you interact with your application.

License: MIT License

JavaScript 90.45% HTML 7.02% CSS 2.53%
react reactjs-components reactjs visualization props states optimization reactoptimization javascript javascript-framework

react-scope's Introduction

React Scope


Visualize your React components as you interact with your application.

React Scope screenshot

Setup

  1. Install React Scope from Chrome web store.
  2. (Important) Install React Developer Tools if you haven't already.
  3. Enable "Allow access to file URLs" in the extension settings for React Scope.
  4. Run your React application.
  5. Open Chrome Developer Tools -> React Scope panel.

Usage

Hover over the nodes within the DOM tree visualization to see each component's state and props.

Use your app to make changes to state (e.g., trigger click events, submit data, etc.).

Every state change will update the visualization. You can click the next / prev buttons to navigate between current and previous states of your application.

Notes

This is an early stable release undergoing continuous development. Currently, this version is optimized for use in developing smaller-scale React applications.

If you experience duplicate state/props information being displayed, please try refreshing the page.

Contact

If you have suggestions or want to help make React Scope better, feel free to submit an issue or contact us at [email protected]. (Pull requests for typographical errors will likely be ignored.)

Check us out at reactscope.com

Authors:

Kevin Gabinete - https://github.com/kgabinete08

Jonathan Lee - https://github.com/GoingInfinity

Tiffany Lin - https://github.com/misstiffanylin

Ringo Yip - https://github.com/ringoyip0901


© React Scope 2018

react-scope's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-scope's Issues

WordPress / Gutenberg issues

Tried out React Scope for Gutenberg development (a WordPress editor project being built in React). Unfortunately, it appears there's some kind of conflict. The post page in WordPress (with Gutenberg activated) never stops loading. It behaves as if Gutenberg hasn't loaded yet, so you're not able to edit the post. I don't know the technical details on Gutenberg, so I can't speak to how it could conflict here, but I thought I'd let you know.

Gutenberg Project:
https://github.com/WordPress/gutenberg

Add CONTRIBUTING.md

A CONTRIBUTING.md file can be added to better understand the project and try to contribute to it.

Feature Request: Inspector view could be bigger

Hi Guys,

great extension btw! Just one thing. Don't suppose you could add the ability to either full screen the react scope view or at least make the inspector views a bit bigger? Just it's difficult (especially for large projects) to get an overview of the complete component hierarchy. See attached screenshot of my work iMac.

screen shot 2018-02-23 at 15 46 38

Error report

Hi all...

Just installed and tried the tool and had no joy. It never picks up (or crashes before it acknowledges) that it's looking at a React app, and I got this error in the logs:

hook.js:56 Uncaught TypeError: Illegal invocation
at Object.stringify ()
at stringifyData (hook.js:56)
at traverseSixteen (hook.js:278)
at traverseSixteen (hook.js:289)
at traverseSixteen (hook.js:289)
at traverseSixteen (hook.js:289)
at traverseSixteen (hook.js:289)
at traverseSixteen (hook.js:289)
at traverseSixteen (hook.js:289)
at checkReactDOM (hook.js:148)
at getInitialState (hook.js:24)
at setInitialState (hook.js:36)
at hook.js:49
stringifyData @ hook.js:56
traverseSixteen @ hook.js:278
traverseSixteen @ hook.js:289
traverseSixteen @ hook.js:289
traverseSixteen @ hook.js:289
traverseSixteen @ hook.js:289
traverseSixteen @ hook.js:289
traverseSixteen @ hook.js:289
checkReactDOM @ hook.js:148
getInitialState @ hook.js:24
setInitialState @ hook.js:36
(anonymous) @ hook.js:49

Running Chrome Version 63.0.3239.132
Dev Tools: 2.5.2
React Scope: 1.1.1

The application is using Redux, Apollo, and RR4, to mention a few complications.

Happy to provide more info if useful.

When used with MobX project: Uncaught TypeError: Cannot read property 'getState' of undefined

(This is related to issue #47, but note that that issue explicitly states in the latest interactions that Redux was present in the reported cases. Mine here is where Redux is not present, but MobX is.)

When used with a project that uses MobX, but not Redux, we get errors in React-Scope, because the extension finds a node named 'Provider' and assumes it's a Redux Provider. In fact, it's a MobX Provider, which doesn't contain the expected properties.

Uncaught TypeError: Cannot read property 'getState' of undefined
    at traverseSixteen (VM174 hook.js:260)
    at traverseSixteen (VM174 hook.js:289)
    at checkReactDOM (VM174 hook.js:148)
    at getInitialState (VM174 hook.js:24)
    at setInitialState (VM174 hook.js:36)
    at VM174 hook.js:49

Chrome DevTools, stopped where it goes wrong:

image

Checking only for the node name 'Provider' isn't sufficient to be sure that a Redux Provider node has been located.

Causes React sites to freeze

After installing the extension, going to sites like facebook.com or reactjs.org would freeze the tab it's on. The sites work like normal immediately after disabling the extension.

chrome locking up

After installing today, I noticed that dozens of sites were freezing. I disabled this extension then everything worked normal.

OSX High Sierra 10.13.3
Chrome 63.0.3239.132 (Official Build) (64-bit)

Here's one url that was locking up in particular: https://bootstrap.build/app

Uncaught TypeError: Cannot read property 'getState' of undefined

Thanks for the great tool. It works great in one of my projects. In another one I get:
Uncaught TypeError: Cannot read property 'getState' of undefined
at traverseSixteen (hook.js:260)
at traverseSixteen (hook.js:289)
at checkReactDOM (hook.js:148)
at getInitialState (hook.js:24)
at setInitialState (hook.js:36)
at hook.js:49

"Uncaught TypeError: Cannot read property '$Js' of undefined" in React project using yfiles library

I have a react project that also uses redux and yfiles.
When I start the application, I get the following error:

Uncaught TypeError: Cannot read property '$Js' of undefined
    at Function.$m10 (:3000/static/js/yfileslib.bundle.js:16607)
    at Object.get (:3000/static/js/yfileslib.bundle.js:16607)
    at Object.stringify (<anonymous>)
    at stringifyData (chrome-extension://nkkiickggkoojpdiajhgkbdmfgcinlai/backend/hook.js:56)
    at traverseSixteen (chrome-extension://nkkiickggkoojpdiajhgkbdmfgcinlai/backend/hook.js:278)
    at traverseSixteen (chrome-extension://nkkiickggkoojpdiajhgkbdmfgcinlai/backend/hook.js:289)
    at traverseSixteen (chrome-extension://nkkiickggkoojpdiajhgkbdmfgcinlai/backend/hook.js:289)
    at checkReactDOM (chrome-extension://nkkiickggkoojpdiajhgkbdmfgcinlai/backend/hook.js:148)
    at getInitialState (chrome-extension://nkkiickggkoojpdiajhgkbdmfgcinlai/backend/hook.js:24)
    at setInitialState (chrome-extension://nkkiickggkoojpdiajhgkbdmfgcinlai/backend/hook.js:36)
    at chrome-extension://nkkiickggkoojpdiajhgkbdmfgcinlai/backend/hook.js:49

The error originates from one of the yfiles file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.