Package Exports
- poper-react-sdk
- poper-react-sdk/dist/index.esm.js
- poper-react-sdk/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (poper-react-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
poper-react-sdk
Official React SDK for Poper - a popups and widgets embed tool.
Installation
npm install poper-react-sdk
# or
yarn add poper-react-sdk
Usage
Basic Usage
import { Poper } from 'poper-react-sdk';
function App() {
// Initialize Poper with your account ID
Poper({
accountID: "your-account-id",
});
return (
<div>
{/* Your app content */}
</div>
);
}
Using the React Hook
import { usePoper } from 'poper-react-sdk';
function App() {
// Initialize Poper with the hook
usePoper({
accountID: "your-account-id",
});
return (
<div>
{/* Your app content */}
</div>
);
}
Configuration Options
Option | Type | Required | Description |
---|---|---|---|
accountID | string | Yes | Your Poper account ID |
Features
- Easy integration with React applications
- Prevents multiple initializations on re-renders
- TypeScript support
- Lightweight