SolidJS

S

SolidJS

Solid is a declarative reactive Javascript library for creating user interfaces.

Join

how to disable server output, enable *only* pre-rendering?

When I enable pre-rendering (SSG) with server.prerender.crawLinks = true, the npm run build command outputs both a server and static pre-render. How do we configure it to output only SSG without the server output?

Unexpected End of JSON Input on API Route

I am working through creating a OIDC workflow. I have a Astro site that sends the user to the Auth endpoint which handles the handshake with Google for Auth and through the redirect_url I send the browser back to the SolidStart App. I have this file at src/routes/auth/callback.ts that works in dev mode but not when deployed: ```...

using id on route and named route breaks

Hello ! I experience an issue with my router where the /:id/@me/ route gets ignored and only the /:id/:guild_id/ route gets mounted when I navigate to http://localhost:1420/123456789123456789/@me (as example) ```tsx...

how to update the DOM styles in a time sequence when a single signal changes?

I want a group of div elements to appear one by one. I tried to do this, it seems that createEffect only updates once? ```javascript...

Is there a way to enforce children of a particular component type?

I'm wanting to make a component that only accepts children that are a specific component so for example: ```tsx // Valid <CodeGroup>...

how to redirect in a "use server" function?

is there a way to redirect outside of cache, action and without useNavigate? ```ts async function redirect() { "use server"; // how??...

Solidstart routing group

```js /(auth) ├── /login │ └── index.tsx └── /register...
No description

isDev is false in dev

import { isDev } from "solid-js/web";
console.log({ isDev });
import { isDev } from "solid-js/web";
console.log({ isDev });
this logs false in dev. why? i'm using solidstart...

How can I make createEffect in SolidJS execute only when the dependency variable changes, and not wh

For example:
const [value, setValue] = createSignal<string>("")
createEffect(() => { localStorage.setItem("value", value()) })
const [value, setValue] = createSignal<string>("")
createEffect(() => { localStorage.setItem("value", value()) })
...

Race condition

i have a login page with a login action like this: ```tsx const login = action(async (formData: FormData) => { ("use server"); const username = formData.get("username");...

Solidstart and websockets

Basically I'm trying to get this to work. https://github.com/peerreynders/solid-start-ws-demo/ It works in dev environment but if I pnpm run build and pnpm run start the websocket connections just instantly close right after opening. I'm not able to get any clues about the issue so I'm wondering if it's anything to do with start or Nitro or Vinxi. Any clues?...

onMount randomly not called

What could be reasons why an onMount effect is not called at all in a completely random pattern? It runs fine in like 19 of 20 times. Other effects still run on the same request, while the onMount doesnt 🤯. ...

Weird Context Behaviour

I'm currently setting up a tip tap editor with solid and wanted to create a context to pass the editor around the components. ```ts import type { SolidEditor } from "@vrite/tiptap-solid"; import { createContext, useContext } from "solid-js"; ...

Cookies banner

Hi everyone Anyone already implemented a Cookies banner on Solid Start to follow the GDPR rules? If yes, what you have used?...

solid-transition-group not working inside createRoot

What im trying to do I want a function that i can call such that i can just inject element where ever i want, this is useful for creating like confirmation. So currently if i want some kind of floating widget that is not always present AKA dynamically show up, im gonna need to create signal and then use that signal to fire <Show />, which is fine for form theyre sometime already huge so adding <Show /> wouldnt be much work. But in the case of simpler things like mere confirmation, i gotta first put that confirmation inside a <Show /> and then create 2 signal one for checking if the element is open and the other for confirmation answer (which is neccessary). and then i gotta make sure that everything is done after that confirmation closed (using effects and such). But now i have made myself a little function to create element outside of the current context so i can just call it where ever. this is the core function ```tsx...

Multiple build

Hi, Currently I have a SolidStart application with two different builds, one for SSR renderer hosted on Vercel and another for Static renderer to build an app with Capacitor. I would like to know what would be the best approach through an npm script to build either application, knowing that I have environment variables that differ....

Getting value from store is not reactive.

It seems like I’ve lost a lot since it’s been so long since I worked with Solid JS. Could you help me understand why getParam isn’t reactive?
No description

SEO

Hi everyone It's possible to generate the robots.txt and sitemap.xml files on Solid Start project?...