
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@developyr/lokryn-dispatch
Advanced tools
A drop-in React component library for integrating Lokryn Dispatch notification system into your React applications.
@developyr/lokryn-dispatch is a reusable React component that provides a complete notification UI with:
npm install @developyr/lokryn-dispatch
import DispatchNotifications from '@developyr/lokryn-dispatch';
import '@developyr/lokryn-dispatch/dist/style.css';
function App() {
return (
<div>
<DispatchNotifications
apiKey="your-api-key"
group="your-notification-group"
userId="user-123"
/>
</div>
);
}
| Prop | Type | Description |
|---|---|---|
apiKey | string | API authentication key for Lokryn Dispatch |
group | string | Notification group identifier |
userId | string | User identifier for tracking read/unread status and interactions |
| Prop | Type | Default | Description |
|---|---|---|---|
apiBaseUrl | string | 'https://api-test.lokryn.com' | Base URL for API endpoints |
className | string | undefined | Custom class for bell wrapper |
listModalClassName | string | undefined | Custom class for notification list modal |
detailModalClassName | string | undefined | Custom class for detail modal |
The component communicates with two Lokryn Dispatch API endpoints:
/dispatch/v1/notificationsFetches notifications for the specified group and user.
Query Parameters:
group: Notification group (sent twice: specific group + "all")userId: (Optional) User identifierHeaders:
Authorization: Bearer {apiKey}/dispatch/v1/eventsRecords user interactions with notifications.
Body:
{
"notificationId": "string",
"responseValue": "string",
"userId": "string",
"snapshot": { /* notification data */ }
}
Headers:
Authorization: Bearer {apiKey}The package is written in TypeScript and exports all necessary types:
import DispatchNotifications, {
Notification,
Button,
DispatchNotificationsProps,
InteractionEventPayload,
NotificationCache
} from '@developyr/lokryn-dispatch';
interface Notification {
id: string;
content: {
title: string;
message: string;
heroImageUrl?: string;
footer?: string;
buttons?: Button[];
customFields?: Record<string, string>;
requiresInitials?: boolean;
};
status: 'read' | 'unread';
}
interface Button {
id: string;
label: string;
actionType: string;
actionValue: string;
}
interface DispatchNotificationsProps {
apiKey: string;
group: string;
userId: string;
apiBaseUrl?: string;
className?: string;
listModalClassName?: string;
detailModalClassName?: string;
}
The component uses CSS with dispatch-prefixed classes for easy customization:
.dispatch-bell-wrapper - Bell button wrapper.dispatch-bell-button - Bell button element.dispatch-badge - Unread notification badge.dispatch-modal-overlay - Modal backdrop.dispatch-modal-content-list - Notification list modal.dispatch-notification-item - Individual notification in list.dispatch-notification-item.read - Read notification state.dispatch-detail-card - Detail modal card.dispatch-action-button - Action buttons/* Override bell button color */
.dispatch-bell-button {
background-color: #your-brand-color;
}
/* Customize modal width */
.dispatch-modal-content-list {
max-width: 500px;
}
/* Style primary action button */
.dispatch-action-button.primary {
background-color: #your-accent-color;
}
<DispatchNotifications
apiKey="your-api-key"
group="general"
/>
<DispatchNotifications
apiKey="your-api-key"
group="user-alerts"
userId={currentUser.id}
/>
<DispatchNotifications
apiKey="your-api-key"
group="notifications"
className="my-custom-bell"
listModalClassName="my-custom-list"
detailModalClassName="my-custom-detail"
/>
<DispatchNotifications
apiKey="your-api-key"
group="updates"
apiBaseUrl="https://api.yourcompany.com"
/>
The component uses a custom React hook (useDispatchNotifications) that manages:
const {
notifications,
loading,
error,
handleInteraction
} = useDispatchNotifications({
apiKey,
group,
userId,
apiBaseUrl
});
cd lokryn-dispatch
npm install
npm run dev - Start Vite dev servernpm run build - Build library (generates TypeScript declarations and bundles)npm run lint - Run ESLintnpm run preview - Preview built packageThe build process generates:
dist/lokryn-dispatch.js - ES moduledist/lokryn-dispatch.umd.cjs - UMD bundledist/index.d.ts - TypeScript declarationsdist/style.css - Component stylesThe component supports all modern browsers that support:
See package.json for license information.
This is a private package developed by Developyr for Lokryn Dispatch integration.
For issues or questions, please contact the Lokryn team or file an issue in the repository.
Built with ❤️ using React + TypeScript + Vite
FAQs
A drop-in React component for Lokryn Dispatch notifications.
We found that @developyr/lokryn-dispatch demonstrated a healthy version release cadence and project activity because the last version was released less than 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
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.

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