Skip to content
LogoLogo

How to register a component

This guide shows you how to connect a component in your application to an experience in the dashboard.

Steps

  1. Wrap your component with the adapter for your framework.
  2. Pass it in the components object of createClient().
  3. Use the same key as the component name of the experience.
import { createClient } from 'picked'
import { adaptReactComponent } from '@picked/react'
import { MyWidget } from './MyWidget'
 
const picked = createClient({
  projectId: 'your-project-id',
  components: {
    MyWidget: adaptReactComponent(MyWidget),
  },
})