React Embed SDK is currently in public preview. The API may change in future releases.
Installation
Quick Start
The SDK requires TanStack Query as a peer dependency. Wrap your application withQueryClientProvider, then add CubeEmbedProvider inside it:
Authentication
The React Embed SDK uses the same session-based authentication as signed embedding. Generate a session using the Generate Session API and pass thesessionId to the provider.
A session expires after about 23 hours. SDK embedding talks to Cube’s APIs directly rather than through an iframe, so the postMessage renewal contract in Keeping a signed session alive — including the autoRenewSession helper — applies to iframe embedding only. With the React Embed SDK, mint a new sessionId before the current one expires and re-render the provider with it.