Files
react/packages/react-devtools-shared/package.json
Sebastian Markbåge b4c38015d0 [DevTools] Remove lodash.throttle (#30657)
Same principle as #30555. We shouldn't be throttling the UI to make it
feel less snappy. Instead, we should use back-pressure to handle it.
Normally the browser handles it automatically with frame aligned events.
E.g. if the thread can't keep up with sync updates it doesn't send each
event but the next one. E.g. pointermove or resize.

However, it is possible that we end up queuing too many events if the
frontend can't keep up but the solution to this is the same as mentioned
in #30555. I.e. to track the last message and only send after we get a
response.

I still keep the throttle to persist the selection since that affects
the disk usage and doesn't have direct UX effects.

The main motivation for this change though is that lodash throttle
doesn't rely on timers but Date.now which makes it incompatible with
most jest helpers which means I can't write tests against these
functions properly.
2024-08-12 12:32:55 -04:00

29 lines
838 B
JSON

{
"private": true,
"name": "react-devtools-shared",
"version": "0.0.0",
"scripts": {
"update-mock-source-maps": "babel-node --presets=@babel/preset-env,@babel/preset-flow ./src/hooks/__tests__/updateMockSourceMaps.js"
},
"devDependencies": {
"react-15": "npm:react@^15",
"react-dom-15": "npm:react-dom@^15"
},
"dependencies": {
"@babel/parser": "^7.12.5",
"@babel/preset-env": "^7.11.0",
"@babel/preset-flow": "^7.10.4",
"@babel/runtime": "^7.11.2",
"@babel/traverse": "^7.12.5",
"@reach/menu-button": "^0.16.1",
"@reach/tooltip": "^0.16.0",
"clipboard-js": "^0.3.6",
"compare-versions": "^5.0.3",
"jsc-safe-url": "^0.2.4",
"json5": "^2.1.3",
"local-storage-fallback": "^4.1.1",
"react-virtualized-auto-sizer": "^1.0.23",
"react-window": "^1.8.10"
}
}