
Security News
npm Introduces minimumReleaseAge and Bulk OIDC Configuration
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.
@paprika/guard
Advanced tools
The <Guard> component is a ... .
> npm install --save @paprika/guard
or
> yarn add @paprika/guard
React <16.8.x
import Guard from "@paprika/guard";
function App() {
function doClose() {}
return (
<Guard.Supervisor>
<Guard.Connector isDirty />
<Guard.Gatekeeper>{canLeave => <button onClick={() => canLeave() && doClose()}>Close</button>}</Guard.Gatekeeper>
</Guard.Supervisor>
);
}
React >=16.8.x
import Guard from "@paprika/guard";
function MyComponent() {
const canLeave = Guard.useGuard(); // a hook
const isDirty = React.useState(false);
function doClose() {}
return (
<div>
<Guard.Connector isDirty={isDirty} />
<button onClick={() => canLeave() && doClose()}>Close</button>
</div>
);
}
function App() {
return (
<Guard.Supervisor>
<MyComponent />
</Guard.Supervisor>
);
}
// TODO
a11yTextcanPropagatechildren (required)hasInsetFocusStyleisDisabledonClick (required)tabIndexroleFAQs
Guard component helps to prevent a user from losing unsaved data
The npm package @paprika/guard receives a total of 1,123 weekly downloads. As such, @paprika/guard popularity was classified as popular.
We found that @paprika/guard demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.

Research
/Security News
Socket uncovered four malicious NuGet packages targeting ASP.NET apps, using a typosquatted dropper and localhost proxy to steal Identity data and backdoor apps.