Install
Create a client component
<SightingWidget /> once near your app root. React effect cleanup removes the UI and aborts pending uploads when the component unmounts. It also supports React Strict Mode’s development remounts.
Next.js App Router
Keep'use client' at the top of the widget file. Import the widget into your layout or page; the rest of the layout can remain a Server Component. The import is SSR-safe, but UI and capture methods need a browser.
Connect your backend
Implement/api/feedback or set endpoint to your receiving API. The package does not create a Next.js route or storage. Follow the multipart server contract.
Uploads omit cookies, even on the same origin. If your endpoint needs authentication, use an appropriate short-lived client token in
headers; keep privileged keys on the server.mount().