React
@picked/react lets the Picked client render React components, and gives hooks and
components to read the client from React.
| Peer dependency | Version |
|---|---|
react, react-dom | ^18.3.0 or ^19.0.0 |
@picked/client | The version of your Picked SDK |
effector | ^23.4.4 |
Entry points
| Import | Exports |
|---|---|
@picked/react | adaptReactComponent, isValidAdaptedComponent, PickedProvider, ExperienceSlot, HtmlRender |
@picked/react/plugins/framework | reactFrameworkPlugin |
@picked/react/hooks | usePicked, useExperience, useStep, useStepContent, useStepLayoutContent, useSetStepContext, useFeature, useFeatureResult, useFeatureEnabled, useAction, useActionResult, useContent, useReference, useReferences, useStoreGlobal, useSessionStorage, useLocalStorage, the field hooks, and the context providers |
@picked/react/router | StepRouter, Step |
@picked/react/form | useForm |
@picked/react/server | renderer, which renders a React component to HTML on the server |
Framework plugin
reactFrameworkPlugin registers React as a framework of the client. The client then
renders each React component in a shadow root.
import { createClient } from 'picked'
import { reactFrameworkPlugin } from '@picked/react/plugins/framework'
const client = createClient({
projectId: 'your-project-id',
plugins: [reactFrameworkPlugin({ components: {} })],
})| Option | Type | Default | Description |
|---|---|---|---|
components | { experience?: { component, style? } } | required | experience renders each experience that has no component of its own. |
stylesheets | string[] | none | The URLs of stylesheets to add to each shadow root. |
css | string[] | none | CSS text to add to each shadow root. |
Components
adaptReactComponent(component) makes a React component that the client can render. It
takes a component, a dynamic import, or a lazy loader. See
How to register a component.
