poper-react-sdk
Official React SDK for Poper - a popups and widgets embed tool.
Installation
npm install poper-react-sdk
yarn add poper-react-sdk
Usage
Basic Usage
import { Poper } from 'poper-react-sdk';
function App() {
Poper({
accountID: "your-account-id",
});
return (
<div>
{/* Your app content */}
</div>
);
}
Using the React Hook
import { usePoper } from 'poper-react-sdk';
function App() {
usePoper({
accountID: "your-account-id",
});
return (
<div>
{/* Your app content */}
</div>
);
}
Configuration Options
| accountID | string | Yes | Your Poper account ID |
Features
- Easy integration with React applications
- Prevents multiple initializations on re-renders
- TypeScript support
- Lightweight