import Test from "./Test";
const TestClientOnly = clientOnly(() => import("./Test"));
export function MyComponent() {
const a = createAsync(async () => {
return { data: await getData() };
});
return (
<Suspense>
<Show when={a()} fallback={<div>Loading tierlist</div>}>
{/* This will not render anything ⚠️ only the fallback */}
{(a) => <TestClientOnly fallback={"Fallback why?"}/>}
{/* This will render Test ✅*/}
{(a) => <Test />}
</Show>
</Suspense>
);
import Test from "./Test";
const TestClientOnly = clientOnly(() => import("./Test"));
export function MyComponent() {
const a = createAsync(async () => {
return { data: await getData() };
});
return (
<Suspense>
<Show when={a()} fallback={<div>Loading tierlist</div>}>
{/* This will not render anything ⚠️ only the fallback */}
{(a) => <TestClientOnly fallback={"Fallback why?"}/>}
{/* This will render Test ✅*/}
{(a) => <Test />}
</Show>
</Suspense>
);