Frequent questions

How to render a webcomponent in Storybook with React

The following error is the most common when using Atomico in Storybook with React.

localhost/:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry

We recommend using @atomico/react, this package creates a friendly wrapper for React.

Using @atomico/react requires the following script to be imported into the .storybook/preview.js file

import "@atomico/react/proxy";

Last updated