@whisperr/react
v0.1.7
Published
React bindings for the Whisperr web SDK — provider + hooks.
Readme
@whisperr/react
React bindings for @whisperr/web.
npm i @whisperr/react @whisperr/webimport { WhisperrProvider, useWhisperr } from "@whisperr/react";
function App() {
return (
<WhisperrProvider apiKey="wrk_…">
<Checkout />
</WhisperrProvider>
);
}
function Checkout() {
const whisperr = useWhisperr();
return (
<button onClick={() => whisperr.track("checkout_started", { cart_value: 49 })}>
Buy
</button>
);
}Initialization is idempotent (safe under StrictMode) and SSR-safe.
