
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@pahans/react-htmltree
Advanced tools
React component for HTML structures based on a string, react component or DOM node
TreeView for HTML/XML structures
The motivation for this component was the lack of a standalone TreeView for HTML documents, which can be easily integrated. Existing solutions are often tightly coupled into specific projects or don't provide necessary customizations options. While its original is based on the TreeView implementation of react-devtools, additional improvements regarding performance and usability were done.
Checkout the example in your browser.
| Chrome DevTools | Firefox DevTools - Light | Firefox DevTools - Dark |
|---|---|---|
![]() | ![]() | ![]() |
import HTMLTree from 'react-htmltree'
<HTMLTree source={document.documentElement}/>
source: Text | React Component | HTMLElement
<HTMLElement source={document.documentElement} onSelect={handleSelect}/>
// others events include: 'hover', 'expand' and 'unfocus'
function handleSelect (element, component) {
console.log(element)
}
<HTMLElement source={'<ul><li>1</li><li>2</li></ul>'} customRender={customRender}/>
// create wrapper around the matched components
function customRender (decorate, node) {
return decorate(function (Component) {
if (node.name === 'script') {
return (
<div style={{ backgroundColor: 'red' }}>
<Component {...Component.props}/>
</div>
)
}
})
}
Further examples can be found here.
To build your own version run npm run dev for development (incl. watch) or npm run build for production (minified).
FAQs
React component for HTML structures based on a string, react component or DOM node
We found that @pahans/react-htmltree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.