typing Page props ?
is it possible to type the props for the page? I'm tryna to block the page until render, and the best I've come up with is:
but the props have to be manually typed
but the props have to be manually typed
deferStream?deferStream stops the SSR response reaching the client until the data has loaded, but it doesn't stop the non-blocking nature of solid's async handlingdeferStream) the server wll update the places that used the data to have the new values, and then send that result to the client<Show> to type narrow and remove the undefined, or do optional chaining like | undefinedcreateAsyncDeferredselectionsselections()?.valueconst createAsyncDeferred = <T,>(
...args: Parameters<typeof createAsync<T>>
) => {
const [fn, opts] = args;
return createAsync<T>(fn, {
...opts,
deferStream: true,
}) as Accessor<T>;
};const user = createAsync(() => getUser(params.id));