Render Mode 1
CDN Mode
The default mode. Plugin bundles are downloaded from the BrainPiper CDN and injected into the browser at runtime, the first time the layout is rendered. No plugin code is included in your app bundle at build time.
Best for — most production apps that are internet-connected and want the smallest possible bundle with zero plugin maintenance.
Pros
- App bundle stays small — no plugin code at build time
- Plugin bug fixes and updates ship automatically, no redeploy needed
- New Studio widget versions go live on next page load
Cons
- Requires an internet connection at runtime
- Plugin execution depends on BrainPiper's CDN availability
Initialise
main.tsx
ComposeKitClient.init({
clientId: 'YOUR_CLIENT_ID',
// disableCdn defaults to false — plugins load from CDN
});Usage
MyPage.tsx
<ComposeKitRenderer
widgetId="YOUR_WIDGET_ID"
data={{ name: 'Jane' }}
onUpdate={(dataPath, value) => console.log(dataPath, value)}
/>