How Web Components and React work together
mainWhen using Web Components in a client-side React SPA, you can use them like standard HTML elements. Ensure you import the loader (either via the auto-defining import or manual registration) before rendering the element.
Note: Because Web Components rely on the DOM, they must be excluded from Server-Side Rendering (SSR) environments.
import 'ldrs/helix'
export default function PageSection({ isLoading }) {
return (
<div aria-live="polite" aria-busy={isLoading}>
{isLoading && <l-helix></l-helix>}
</div>
)
}