UseDocumentation Index
Fetch the complete documentation index at: https://docs.pnlight.app/llms.txt
Use this file to discover all available pages before exploring further.
@pnlight/sdk-react-native for React Native apps that need PNLight on iOS.
Install
0.5.2.
The package includes optional Expo support. If you use Expo, rebuild the native app after adding the package.
Initialize the SDK
Callinitialize once during app startup.
Common calls
Server-driven UI component
UseRemoteUiView to fetch and render a placement.
Server-driven UI props
| Prop | Type | Description |
|---|---|---|
placement | string | Placement ID configured in PNLight. |
cardId | string | Optional card ID. Defaults to a placement-based value. |
secure | boolean | Prevents screenshots and recordings when enabled. Defaults to true. |
preventRecording | boolean | Blocks the rendered UI after a capture attempt when enabled. Defaults to true. |
attributionRequired | boolean | Waits for attribution before returning a config when enabled. Defaults to true. |
onAction | function | Handles custom actions from the rendered UI. |