
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
empty-ghost
Advanced tools
该组件允许开发者在不影响页面布局的情况下插入内容,同时通过 React 的 ref 功能获取到其子元素的真实 DOM 并且事件传递
npm install empty-ghost
/**EmptyGhost Demo**/
import Ghost from "empty-ghost";
/**
* The function of the EmptyGhost is to render not only children, but also click events in the proxy children
* It is equivalent to rendering < div > {children} < / div > but deleting the div after the first rendering
**/
export function App() {
return (
<Ghost
ref={(ref)=>{
console.log('You will get the divs ref !!!',ref);
}}
onClick={(e)=>{
console.log('any event you can add to EmptyGhost ',e);
}}
>
<div>123</div>
</Ghost>
);
}
| 参数 | 类型 |
|---|---|
| 📒EmptyGhostProps | Interfaces |
| 🎗️default | Functions |
| 参数 | 类型 | 说明 | 默认值 |
|---|---|---|---|
| is | ?: string | ||
| style | ?: Omit<React.CSSProperties, "display"> | 自定义样式,禁止覆盖 `display` 属性,因为组件内部强制使用 `display: contents` |
EmptyGhostProps & React.RefAttributes<null | Element | Text>): React.ReactNodeFAQs
该组件允许开发者在不影响页面布局的情况下插入内容,同时通过 React 的 ref 功能获取到其子元素的真实 DOM 并且事件传递
We found that empty-ghost demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.