Brendonovich
Brendonovich
Explore posts from servers
SSolidJS
Created by Anshu on 5/18/2025 in #support
How to redirect from sub query
Ah good point, it’ll at least dedupe during SSR
18 replies
SSolidJS
Created by Anshu on 5/18/2025 in #support
How to redirect from sub query
Caching the call on the request is what I'd do:
async function getSessionUser() {
const session = await getSession();
const userId = session.data.userId;
return await db.user.findUnique({ where: { id:userId } });
}

async function getSessionUserDeduped() {
const { locals } = getRequestEvent();

locals.getSessionUser ??= getSessionUser();

return await locals.getSessionUser;
}
async function getSessionUser() {
const session = await getSession();
const userId = session.data.userId;
return await db.user.findUnique({ where: { id:userId } });
}

async function getSessionUserDeduped() {
const { locals } = getRequestEvent();

locals.getSessionUser ??= getSessionUser();

return await locals.getSessionUser;
}
18 replies
SSolidJS
Created by danchez on 4/24/2025 in #support
renderToString in Elysia BFF Layer
I think this is a separate app to the spa
47 replies
SSolidJS
Created by danchez on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Nah Solid's compiler does all the work of JSX transformation, hence requiring jsx: preserve
47 replies
SSolidJS
Created by danchez on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Bun only supports the React JSX transform
47 replies
SSolidJS
Created by danchez on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Since solid uses a custom JSX transform it's necessary to have the babel plugin run on it
47 replies
SSolidJS
Created by danchez on 4/24/2025 in #support
renderToString in Elysia BFF Layer
I don't think that's sufficient to actually perform the JSX transform, that requires the babel plugin
47 replies
SSolidJS
Created by danchez on 4/24/2025 in #support
renderToString in Elysia BFF Layer
If bun is doing the TS transpiling then it'll need to know how to transform the JSX, TS might just be doing typechecking
47 replies
SSolidJS
Created by tronis on 4/12/2025 in #support
Preloading route data with context access
Yeah, but making the preload function a server function kinda defeats the point
10 replies
SSolidJS
Created by tronis on 4/12/2025 in #support
Preloading route data with context access
we made a change a while ago so that preloads ran within the router's owner, which includes contexts
10 replies
SSolidJS
Created by tronis on 4/12/2025 in #support
Preloading route data with context access
If you put the context outside of Router i think you actually can access those contexts in preload
10 replies
SSolidJS
Created by karolisk on 4/7/2025 in #support
NX setup with SolidJS and React
That's a typescript error, looks like one of your packages is using React JSX instead of Solid?
4 replies
SSolidJS
Created by vanguy on 4/4/2025 in #support
Where is @remult/solid
i'm not sure, i'd follow what their documentation says
10 replies
SSolidJS
Created by vanguy on 4/4/2025 in #support
Where is @remult/solid
yeah you're importing it import { RemultSolidStart } from "@remult/solid";
10 replies
SSolidJS
Created by vanguy on 4/4/2025 in #support
Where is @remult/solid
looks like @remult/solid doesn't exist
10 replies
SSolidJS
Created by vanguy on 4/4/2025 in #support
Where is @remult/solid
Have you installed @remult/solid?
10 replies
SSolidJS
Created by exercise on 3/31/2025 in #support
preload fonts in start
preloading that many fonts at once will probably affect your load times
40 replies
SSolidJS
Created by exercise on 3/31/2025 in #support
preload fonts in start
do a prod build to find out if it actually works
40 replies
SSolidJS
Created by exercise on 3/31/2025 in #support
preload fonts in start
vinxi thing or something
40 replies
SSolidJS
Created by exercise on 3/31/2025 in #support
preload fonts in start
i don't think u can avoid fout in dev
40 replies