Skip to content

Commit 551ef9d

Browse files
authored
fix(client-only-components): fix ClientOnly children call (#120)
<ClientComponent> calls its child. https://github.com/sergiodxa/remix-utils/blob/main/src/react/client-only.tsx#L30
1 parent 07b18dc commit 551ef9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client-only-components/app/routes/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ export default function Screen() {
88
return (
99
<>
1010
<ClientOnly fallback={<p>Loading...</p>}>
11-
<BrokenOnTheServer />
11+
{() => <BrokenOnTheServer />}
1212
</ClientOnly>
1313

1414
<ClientOnly fallback={<p>Loading...</p>}>
15-
<ComplexComponent />
15+
{() => <ComplexComponent />}
1616
</ClientOnly>
1717

1818
<button

0 commit comments

Comments
 (0)