
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
global-component
Advanced tools
import Master, {Global} from "global-component";
import Button from "@mui/material/Button";
function App() {
const {openTip} = useContext(Global)
return <Button onClick={() => {
openTip("好椰")
}}>
click
</Button>
}
ReactDOM.render(
<React.StrictMode>
<Master>
<App/>
</Master>
</React.StrictMode>
,
document.getElementById('root')
);

默认使用 mui5 的相关组件,可自定义
import Master, {GlobalTip} from "global-component";
function Tip(props: GlobalTip) {
const {
open,
autoHideDuration,
type,
info,
onClose//用于将open set为false的函数 无需定义,使用即可
} = props
return <div className={'tip'}>
{open ? <>content here</> : ""}
<input type={"button"} onClick={() => onClose()}>关闭</input>
</div>
}
ReactDOM.render(
<React.StrictMode>
<Master Tip={Tip}>
<App/>
</Master>
</React.StrictMode>
,
document.getElementById('root')
);
FAQs
support some common global component api use react and mui5
The npm package global-component receives a total of 0 weekly downloads. As such, global-component popularity was classified as not popular.
We found that global-component 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
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.