UNPKG

@notifyon/react

Version:
46 lines (34 loc) 807 B
# @notifyon/react React SDK for NotifyOn - Real-time notifications for your React applications. ## Installation ```bash npm install @notifyon/react # or yarn add @notifyon/react # or pnpm add @notifyon/react ``` ## Usage ```jsx import { NotifyOn } from '@notifyon/react'; function App() { return ( <> <NotifyOn publicKey="pk_your_public_key" userId="user_123" /> {/* Your app components */} </> ); } ``` ## Props | Prop | Type | Required | Description | |------|------|----------|-------------| | `publicKey` | string | Yes | Your NotifyOn public key | | `userId` | string | Yes | The user ID to receive notifications | ## SSR Support The component automatically handles server-side rendering and only initializes on the client side. ## License MIT