diff --git a/src/components/svelte-react.ts b/src/components/svelte-react.ts index ed2a5ceed..d94d81706 100644 --- a/src/components/svelte-react.ts +++ b/src/components/svelte-react.ts @@ -8,7 +8,8 @@ import { type PropsWithChildren, useState, type PropsWithoutRef, - useLayoutEffect + useLayoutEffect, + type JSX } from 'react' import type { SvelteComponent } from 'svelte' @@ -117,7 +118,7 @@ export default function SvelteWebComponentToReact< props: PropsWithoutRef>, forwardedRef: ForwardedRef ) => { - const component = useRef() + const component = useRef(null) const { setElement } = useEventHandlers(props) const setRef = useCallback(