MCPcopy
hub / github.com/reactopt/reactopt

github.com/reactopt/reactopt @main sqlite

repository ↗ · DeepWiki ↗
22 symbols 31 edges 9 files 2 documented · 9%
README

reactopt

reactopt

npm version

A CLI React performance optimization tool that identifies potential unnecessary re-rendering.

About

Reactopt identifies specific events that may be causing unnecessary re-rendering of components in your application, and which components may benefit from utilizing shouldComponentUpdate.

Prior to React 16, the module react-addons-perf helped identify locations that developers may want to implement shouldComponentUpdate to limit over-rendering. However, since the module is no longer supported we created Reactopt to fill the gap, and also provide increased functionality for any version of React.

Upon initiating Reactopt, your application will be launched in a browser for you to interact with. After you're finished and type 'done', you will see an audit on your application's component performance.

1.5.0 is the first working version of this module. Utilizes async/await, which is natively supported in Node 7.6+.

Interaction Events Currently Supported:

  • Click/Double Click
  • Drag
  • KeyPress
  • KeyDown
  • Input

We welcome contributions that add additional functionality.

reactopt-screenshot

Install and Use

npm install

npm install --save-dev reactopt

Include this code at the top of your main React component file (our module is meant to be used in development mode):

import React from 'react'

if (process.env.NODE_ENV !== 'production') {
    const { reactopt } = require('reactopt');
    reactopt(React);
}

Include this script in your package.json:

"reactopt": "node node_modules/reactopt/main.js"

Run command

npm run reactopt localhost:####

In the Pipeline

  • Support for React Native
  • Currently gathering feedback from users on useful updates to documentation/readme

Team

This module was created by Candace Rogers, Pam Lam, Vu Phung, Selina Zawacki

Contact

Like our app, found a bug?

Let us know!

reactopt@gmail.com

Visit us at www.reactopt.com

Acknowledgements

Utilizes a modified version of (why-did-you-update by maicki)

Core symbols most depended-on inside this repo

printLine
called by 7
main.js
setInnerText
called by 7
src/index.js
_interopRequireDefault
called by 7
src/deepDiff.js
toArray
called by 2
src/normalizeOptions.js
createComponentDidUpdate
called by 2
src/index.js
_interopRequireDefault
called by 1
src/shouldInclude.js
_interopRequireDefault
called by 1
src/normalizeOptions.js
reactoptRun
called by 0
main.js

Shape

Function 22

Languages

TypeScript100%

Modules by API surface

src/index.js6 symbols
main.js5 symbols
src/normalizeOptions.js4 symbols
src/deepDiff.js4 symbols
src/shouldInclude.js2 symbols
src/getDisplayName.js1 symbols

Dependencies from manifests, versioned

babel-cli6.26.0 · 1×
babel-core6.26.0 · 1×
babel-loader7.1.2 · 1×
babel-preset-es20156.24.1 · 1×
chai4.1.2 · 1×
chalk2.3.0 · 1×
console-png1.2.1 · 1×
lodash4.13.1 · 1×
lodash-webpack-plugin0.8.1 · 1×
mocha4.0.1 · 1×
puppeteer0.12.0 · 1×
react15.0 || 0.14.x · 1×

For agents

$ claude mcp add reactopt \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact