New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-state-trace

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-state-trace

A state trace viewer for react apps

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

react-state-trace

  • React devtool that lets you break your app state into its atomic particles and view each of them autonomously as they change.

Demo

react-state-trace

Installation

npm install --save react-state-trace

Usage

  • Press shift + s to show or hide the devtool
import React from 'react';
import ReactDOM from 'react-dom';
import store from './store';
import StateViewer from 'react-state-trace';

const App = () => (
    <div>
        <StateViewer store={store} />  
        <div>
            <p>REACT STATE TRACE IS IN THE HOUSE</p>
            <button>Like</button>
        </div>
    </div>
);

ReactDOM.render(
    <App />,
    document.getElementById('root')
);
  • StateViewer is a toggleable component through which you can navigate your app state and see all the moving parts as they change in real time.
  • props. one of the following should be passed to the component to track the state:
    • state - explicitly pass the app state.
    • store - pass a store holding the app state. the store should have one of the following attributes:
      • getState - a function that returns the app state (as implemented im redux for example).
      • state - the application state attribute.
    • dev - defaults to true, pass false in order for the devtool not to render.

Keywords

FAQs

Package last updated on 27 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc