Installations
npm install ep-mobx-react-devtools
Developer Guide
Typescript
No
Module System
CommonJS
Score
60.5
Supply Chain
96.7
Quality
74.7
Maintenance
100
Vulnerability
100
License
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
mobxjs
Download Statistics
Total Downloads
2,272
Last Day
3
Last Week
11
Last Month
33
Last Year
558
GitHub Statistics
MIT License
1,227 Stars
223 Commits
49 Forks
18 Watchers
4 Branches
44 Contributors
Updated on Jan 24, 2025
Bundle Size
49.34 kB
Minified
11.78 kB
Minified + Gzipped
Package Meta Information
Latest Version
5.0.2
Package Id
ep-mobx-react-devtools@5.0.2
Unpacked Size
271.53 kB
Size
210.75 kB
File Count
20
Total Downloads
Cumulative downloads
Total Downloads
2,272
mobx-react-devtools
DevTools for MobX to track the rendering behavior and data dependencies of your app.
Installation
npm install --save-dev mobx-react-devtools
or
<script src="https://unpkg.com/mobx-react-devtools"></script>
Usage
Somewhere in your application, create a DevTools component:
1import DevTools from 'mobx-react-devtools'; 2 3class MyApp extends React.Component { 4 render() { 5 return ( 6 <div> 7 ... 8 <DevTools /> 9 </div> 10 ); 11 } 12}
or
React.createElement(mobxDevtools.default)
Supported props:
highlightTimeout
— number, default: 1500position
— object, position of control panel, default:{ top: 0, right: 20 }
From there on, after each rendering a reactive components logs the following three metrics:
- Number of times the component did render so far
- The time spend in the
render()
method of a component - The time spend from the start of the
render()
method until the changes are flushed to the DOM
For each component the color indicates roughly how long the coloring took. Rendering times are cumulative; they include time spend in the children
- Green: less then 25 ms
- Orange: less then 100 ms
- Red: rendering for this component took more than 100ms
About log groups
Note that if logging is enabled, MobX actions and reactions will appear as collapsible groups inside the browsers console. Mind that any log statements that are printed during these (re)actions will appear inside those groups as well, so that you can exactly trace when they are triggered.
Configuration
1import { configureDevtool } from 'mobx-react-devtools';
2
3// Any configurations are optional
4configureDevtool({
5 // Turn on logging changes button programmatically:
6 logEnabled: true,
7 // Turn off displaying components updates button programmatically:
8 updatesEnabled: false,
9 // Log only changes of type `reaction`
10 // (only affects top-level messages in console, not inside groups)
11 logFilter: change => change.type === 'reaction',
12});
13
There are also aliases for turning on/off devtools buttons:
1import { setLogEnabled, setUpdatesEnabled, setGraphEnabled } from 'mobx-react-devtools'; 2 3setLogEnabled(true); // same as configureDevtool({ logEnabled: true }); 4setUpdatesEnabled(false); // same as configureDevtool({ updatesEnabled: false }); 5setGraphEnabled(false); // same as configureDevtool({ graphEnabled: false });
Custom panel design
1import DevTools, { GraphControl, LogControl, UpdatesControl } from 'mobx-react-devtools'; 2 3class MyNiceButton extends React.Component { 4 render() { 5 const { active, onToggle, children } = this.props; 6 return ( 7 <button onClick={onToggle}> 8 {children} 9 {active ? ' on' : ' off'} 10 </button> 11 ); 12 } 13} 14 15class MyApp extends React.Component { 16 render() { 17 return ( 18 <div> 19 20 {/* Include somewhere with `noPanel` prop. Is needed to display updates and modals */} 21 <DevTools noPanel /> 22 23 <div className="my-custom-devtools-panel-design"> 24 <GraphControl> 25 {/* Must have only one child that takes props: `active` (bool), `onToggle` (func) */} 26 <MyNiceButton>Graph</MyNiceButton> 27 </GraphControl> 28 <LogControl> 29 {/* Must have only one child that takes props: `active` (bool), `onToggle` (func) */} 30 <MyNiceButton>Log</MyNiceButton> 31 </LogControl> 32 <UpdatesControl> 33 {/* Must have only one child that takes props: `active` (bool), `onToggle` (func) */} 34 <MyNiceButton>Updates</MyNiceButton> 35 </UpdatesControl> 36 </div> 37 </div> 38 ); 39 } 40}
Roadmap
Be able to turn dev-tools on and off at runtimeSelect and log dependency tree of components- Visualize observer tree values
Be able to enable state change tracking from the extras module
Changelog
5.0.1
- Updated peer dependencies for mobx-react@5.0.0
5.0.0
- Upgraded to MobX 4.0.0
4.2.15
- Fixed error on logging & expr
4.2.14
- Stopped using mobx default export (#1043)
4.2.13
- Fixed warning about calling PropTypes validators directly (#62)
4.2.12
- Added react 15.5/16 support
4.2.11
- Added MobX 3 support
4.2.9
- Fixed typescript typings (#42)
4.2.8
- Fixed typescript typings (#36)
4.2.7
- Fixed passing highlightTimeout from DevTools (#41)
4.2.6
- Fixed “max event listeners” warning when rendering in node.js ()
4.2.5
- Added ability to filter displaying changes in console
- Fixed submitting forms by DevTools panel buttons (#29)
4.2.4
- Added ability to change buttons state programmatically(#27)
4.2.3
- Made console colors lighter (#25)
4.2.2
- Added modular devtools controls (#21)
4.0.5
- Added Object.assign polyfill to avoid issues with server side rendering on old node vesions
4.0.2
- Make sure AMD / root imports work (#12)
- DevTools should now 'work' (not do anything) when used in Isomorphic rendering (#11)
- Highlighting boxes now show up at the proper coordinates when using complex stacking contexts
4.0.1
- Added typescript typings (see #6)
- Use (fix) uglify, by @evoyy
- Added option to customize the position of the toolbar (by @evoyy)
4.0.0
- Upgraded to MobX 2.0 / MobX React 3.0

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 6/13 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 23 are checked with a SAST tool
Reason
66 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-h9rv-jmmf-4pgx
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
2.3
/10
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More