react-devtools-inline
Advanced tools
Comparing version 4.18.0 to 4.19.0
{ | ||
"name": "react-devtools-inline", | ||
"version": "4.18.0", | ||
"version": "4.19.0", | ||
"description": "Embed react-devtools within a website", | ||
@@ -16,3 +16,4 @@ "license": "MIT", | ||
"build-info.json", | ||
"frontend.js" | ||
"frontend.js", | ||
"hookNames.js" | ||
], | ||
@@ -24,3 +25,6 @@ "scripts": { | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"source-map-js": "^0.6.2", | ||
"sourcemap-codec": "^1.4.8" | ||
}, | ||
"devDependencies": { | ||
@@ -27,0 +31,0 @@ "@babel/core": "^7.11.1", |
@@ -67,2 +67,19 @@ # `react-devtools-inline` | ||
### Supporting named hooks | ||
DevTools can display hook "names" for an inspected component, although determining the "names" requires loading the source (and source-maps), parsing the code, and infering the names based on which variables hook values get assigned to. Because the code for this is non-trivial, it's lazy-loaded only if the feature is enabled. | ||
To configure this package to support this functionality, you'll need to provide a prop that dynamically imports the extra functionality: | ||
```js | ||
// Follow code examples above to configure the backend and frontend. | ||
// When rendering DevTools, the important part is to pass a 'hookNamesModuleLoaderFunction' prop. | ||
const hookNamesModuleLoaderFunction = () => import('react-devtools-inline/hookNames'); | ||
// Render: | ||
<DevTools | ||
hookNamesModuleLoaderFunction={hookNamesModuleLoaderFunction} | ||
{...otherProps} | ||
/>; | ||
``` | ||
### Configuring a same-origin `iframe` | ||
@@ -69,0 +86,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
21119654
15
138057
233
4
2
+ Addedsource-map-js@^0.6.2
+ Addedsourcemap-codec@^1.4.8
+ Addedsource-map-js@0.6.2(transitive)
+ Addedsourcemap-codec@1.4.8(transitive)