mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Stacked on https://github.com/facebook/react/pull/28351, please review only the last commit. Top-level description of the approach: 1. Once user selects an element from the tree, frontend asks backend to return the inspected element, this is where we simulate an error happening in `render` function of the component and then we parse the error stack. As an improvement, we should probably migrate from custom implementation of error stack parser to `error-stack-parser` from npm. 2. When frontend receives the inspected element and this object is being propagated, we create a Promise for symbolicated source, which is then passed down to all components, which are using `source`. 3. These components use `use` hook for this promise and are wrapped in Suspense. Caching: 1. For browser extension, we cache Promises based on requested resource + key + column, also added use of `chrome.devtools.inspectedWindow.getResource` API. 2. For standalone case (RN), we cache based on requested resource url, we cache the content of it.
31 lines
900 B
JSON
31 lines
900 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",
|
|
"lodash.throttle": "^4.1.1",
|
|
"memoize-one": "^3.1.1",
|
|
"react-virtualized-auto-sizer": "^1.0.23",
|
|
"react-window": "^1.8.10"
|
|
}
|
|
}
|