(props: ClientOnlyProps)
| 29 | * ``` |
| 30 | */ |
| 31 | export function ClientOnly(props: ClientOnlyProps) { |
| 32 | const hydrated = useHydrated() |
| 33 | return ( |
| 34 | <Solid.Show when={hydrated()} fallback={props.fallback ?? null}> |
| 35 | <>{props.children}</> |
| 36 | </Solid.Show> |
| 37 | ) |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Return a boolean indicating if the JS has been hydrated already. |
nothing calls this directly
no test coverage detected