Madaxen86
Madaxen86
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Not totally sure, but I think renderToString must be called on the server.
28 replies
SSolidJS
Created by MaveriX89 on 4/24/2025 in #support
renderToString in Elysia BFF Layer
Maybe just add this to tsconfig
"jsx": "preserve",
"jsxImportSource": "solid-js",
"jsx": "preserve",
"jsxImportSource": "solid-js",
28 replies
SSolidJS
Created by Eddy on 4/23/2025 in #support
Solid Router Nested Urls
Maybe you have destructured props in the layout?
4 replies
SSolidJS
Created by stan_dard on 4/21/2025 in #support
solid-primitives/storage help for a persistent user config store not loading properly on refresh/
Yes, but it will the same for every page.
11 replies
SSolidJS
Created by stan_dard on 4/21/2025 in #support
solid-primitives/storage help for a persistent user config store not loading properly on refresh/
If SSR is enabled the initial page load/render will be done on the server. Great from SEO optimisation, preview links in Meta and other social media apps.
11 replies
SSolidJS
Created by stan_dard on 4/21/2025 in #support
solid-primitives/storage help for a persistent user config store not loading properly on refresh/
Or you can add ssr:false to you app.config.ts
11 replies
SSolidJS
Created by stan_dard on 4/21/2025 in #support
solid-primitives/storage help for a persistent user config store not loading properly on refresh/
Use the cookieStorage as local storage is not available on the server only cookies are available both on client and server.
11 replies
SSolidJS
Created by stan_dard on 4/21/2025 in #support
solid-primitives/storage help for a persistent user config store not loading properly on refresh/
Are you using SSR?
11 replies
SSolidJS
Created by lili/lilith on 4/15/2025 in #support
Cannot run React alongside SolidJS in Astro
Here's a minimal Astro setup. Check especially 1. tsconfig.ts
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "react"
}
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "react"
}
2. astro.config.mjs 3. upgrade to latest versions of packages after project setup (in my case pnpm upgrade) Note: I didn't even need the /** @jsxImportSource solid-js */ because probably astro adds this though its config. https://github.com/madaxen86/astro-solid-react
7 replies
SSolidJS
Created by Garzec on 4/15/2025 in #support
Need help understanding preload and file conventions
Concepts in the docs you should look at: 1. Suspense 2. ErrorBoundaries 3. createAsync -> deferStream 4. query In a nutshell. By default SolidStart streams responses. This means it is not waiting for async resource to resolve it will just fallback to the nearest Suspense boundary. This means that preloading just starts to request the data. That request mights have not fully resolved when the new page is rendering -> resulting in fallback to Suspense. I have also made a more detailed video about data fetching in SolidStart looking at all the concepts like suspense ErrorBoundaries query etc: https://youtu.be/Qw9am5NL6AI?si=fPMFo0Rgc0H7kJRv
4 replies
SSolidJS
Created by Garzec on 4/15/2025 in #support
Need help understanding preload and file conventions
I suggest this talk from Ryan showing the basics of SolidStart https://youtu.be/ZVjXtfdKQ3g?si=monkC7XSNmDngA23
4 replies
SSolidJS
Created by lili/lilith on 4/15/2025 in #support
Cannot run React alongside SolidJS in Astro
Try to add this a the top of your solidjs files: /** @jsxImportSource solid-js */ https://docs.solidjs.com/configuration/typescript#configuring-typescript
7 replies
SSolidJS
Created by *sang on 4/14/2025 in #support
Can't install or get a project started using SolidJs
There are some issues with bun. Maybe adding the —bun flag to the scripts in package.json helps. Where does the command you use come from. You‘ll usually just run E.g. pnpm create solid And the follow the instructions in the cli.
4 replies
SSolidJS
Created by tronis on 4/12/2025 in #support
Preloading route data with context access
So the answer would be it depends on how preloadHome is implemented.
10 replies
SSolidJS
Created by tronis on 4/12/2025 in #support
Preloading route data with context access
Well depends: e.g. if the preload functions uses "use server" it cannot access the client's context, right? That's why I prefer cookies which are included in requests from the client and can be accessed on the server.
10 replies
SSolidJS
Created by SkyLissh on 4/11/2025 in #support
SSR blank page
That’s probably a bun thing. There’s an issue : https://github.com/oven-sh/bun/issues/11381 may be unrelated. And I found this: "Vinxi project such as solid-start doesn't work with Deno 2.0 Here is a repo: https://github.com/Ciantic/deno-solid-test This most likely because Vinxi runs node.exe behind the scenes instead of deno.exe. It's notable that bun also has same error, but it can be fixed by using a flag --bun that fakes bun.exe as node.exe."
58 replies
SSolidJS
Created by Jason.json on 4/10/2025 in #support
A question about server side rendering an <a> tag based on requestEvent.
Instead of request Event you can get the current route with useLocation which is isomorphic. But couldn’t you just do construct the url with string concatenation? Also if you look for a "typesafe" file routes there’s this package which helps to create valid routes. https://www.npmjs.com/package/solid-start-typesafe-routes-plugin https://docs.solidjs.com/solid-router/reference/primitives/use-location#uselocation and if you have a dynamic route that has the lang as a route param you can get this with useParams https://docs.solidjs.com/solid-router/reference/primitives/use-params
14 replies
SSolidJS
Created by tronis on 4/12/2025 in #support
Preloading route data with context access
That won’t work (also with signal), because they will get initialised on the server and then again on the client with a different ref. This can lead to hydration issues. Are you intending to use a server or are you creating a pure SPA with an external API?
10 replies
SSolidJS
Created by tronis on 4/12/2025 in #support
Preloading route data with context access
You can’t access context in preload functions. They are called outside of the app. But cookies will be included in the request. So if you fetch with credentials:"include" you can add tokens / api keys that way.
10 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
In app.config.ts you can set SSR:false and you have a classic SPA
207 replies