Getting started
Installation
To start using the Spot React library, install it via npm
:
or with yarn
:
Basic Usage
Step 1: Set up the Provider
To enable ads across your application, wrap your root component with the SpotAdsProvider
component and provide your apiKey
.
Example
./src/App.jsx
Step 2: Displaying an Ad
In any component where you want to display an ad, you can use the useSpotAd
hook.
Import the
useSpotAd
hook:Set up the ad display logic.
Example
./src/MyComponent.jsx
Last updated