
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
@croz/nrich-notification-core
Advanced tools
Contains core utilities related to the nrich-notification module
@croz/nrich-notification-core
is a module that is designed for showing automatic messages from the backend on the user interface.
It's the frontend part of nrich-notification backend module.
Internally, it intercepts http calls and scans for sign of nrich notification object, and shows the notification if it exists.
To use this module in your project run npm install @croz/nrich-notification-core
or yarn add @croz/nrich-notification-core
On the top level of your app, register an appropriate interceptor for notifications.
fetchNotificationInterceptor()
.XMLHttpRequest
, e.g. axios
, use xhrNotificationInterceptor()
.Using the useNotification()
custom hook you get an object containing notifications
array and remove
and add
methods for working with that array. Alternatively, you can use the standalone removeNotification
and addNotification
methods if the hook variant is not fit for your use-case.
Example:
import { useNotifications } from "@croz/nrich-notification-core";
const Notification = ({ title, content, onRemove }) => (
<div>
<h3>{title}</h3>
<div>{content}</div>
<button onClick={onRemove}>×</button>
</div>
)
export const Notifications = () => {
const { notifications, remove } = useNotifications();
return (
<div>
{notifications.map(notification => <Notification {...notification} onRemove={() => remove(notification)}/>)}
</div>
)
}
If you're using this module alone, you need to provide your own notification UI. For the prepared implementation in MUI, see @croz/nrich-notification-mui docs
FAQs
Contains core utilities related to the nrich-notification module
The npm package @croz/nrich-notification-core receives a total of 48 weekly downloads. As such, @croz/nrich-notification-core popularity was classified as not popular.
We found that @croz/nrich-notification-core demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.