col16
col16
SSolidJS
Created by col16 on 9/3/2024 in #support
Type '() => JSX.Element' is not assignable to type 'Element'
yep, true! oops.
7 replies
SSolidJS
Created by col16 on 9/3/2024 in #support
Type '() => JSX.Element' is not assignable to type 'Element'
Okay. so I guess the equivalent would be
import type { Component } from "solid-js";
import { createSignal, Show } from "solid-js";
import NavMenu from "../components/details/NavMenu";

const DetailPage: Component = () => {
const [loading, setLoading] = createSignal(true);
return (
<div>
<NavMenu />
<div>
<Show when={loading()} fallback={<p>Some content</p>}>
<p>Loading...</p>;
</Show>
</div>
</div>
);
};
import type { Component } from "solid-js";
import { createSignal, Show } from "solid-js";
import NavMenu from "../components/details/NavMenu";

const DetailPage: Component = () => {
const [loading, setLoading] = createSignal(true);
return (
<div>
<NavMenu />
<div>
<Show when={loading()} fallback={<p>Some content</p>}>
<p>Loading...</p>;
</Show>
</div>
</div>
);
};
7 replies