SolidJS

S

SolidJS

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

Join

Stale read in <List><Show><List>

https://playground.solidjs.com/anonymous/ccb906d4-c9f1-437f-9f72-e94279b0e25d I am stumped, I don't know why the stale read is happening, I don't know why it's triggered by that stream of states and not others. Note that the playground doesn't render the error message correctly, here's the dev message:...

Untrack on store arrays

Yesterday I had some misunderstandings around createEffect and stores. Today I probably have similar misunderstandings around untrack. My assumption was that, e.g. ``` createEffect(() => {...

createEffect vs createEffect + on

What could be the reason that the first createEffect is triggered but not the second one using on? I feel there is something obvious I'm missing. Using solid-js 1.9.5 ``` createEffect(() => { console.log("effect", props.nearestPointConfig);...

SolidJS Router Missunderstanding

Can someone help me setup a basic router with the "@solidjs/router" I am not sure where to put what. My current understanding was that this is the way to do but document.getElementById is underlined red: ``` Argument of type 'HTMLElement | null' is not assignable to parameter of type 'MountableElement'....

Clearing form after action in solid-start

Searches on this discord return old posts that suggest using createEffect on submission.pending along with a ref to the form to do clearing. I'm just checking if this is still the right way to handle form clearing after successful actions. Please let me know if you have a better suggestion. Thanks...

Would this break reactivity?

I'm new to signals. The solidstart tutorial mentioned that destructuring may break reactivity in components. I don't fully understand that just yet and wonder if that means the following hook would break reactivity. This is a convenience hook I'm writing to simplify usage of the better-auth useSession hook. If it can potentially break reactivty, how would you suggest accomplishing the goal of unpacking the data field into user and session? ```...

Multi Layout Children

Is it possible for a page to set some data to go into different layout locations, like named slots for children please?

Getting Page Title

If this is in a route: <Title>Example 🧘‍♀️</Title> Is there anyway to get that information in the Layout of that route please? I figured I could hack like an onMount + js thing but wondering if server side in the layout i could know this info w/ Solid's api please?...

State Doesn't Get Defaulted And Values Don't Change

So i am making a reactive state system where the developer of a component can supply a default state and other states if they want. The default state is used when nothing is active and regarding the states. The code checks on the array to say which is active, the way the state array is orchestrated, it uses the first active state present in the list Each state has specific values to it, like color & other stuff. The STATE DEFAULTING EFFECT gets triggered and correctly switches the state. However the STATE DEFAULTING MEMO is not triggered. For some reason when i get the style field, even tho it does supply the correct value. The values do not get updated For context getterFromReactive "normalizes" the values into just accessors. It does create a effect for checking whenever the value is changed or not and update the returned value accordingly...

Need help understanding preload and file conventions

Hello guys, I started with SolidStart and want to fetch data before rendering the page, So I found preload here https://docs.solidjs.com/solid-start/building-your-application/routing#additional-route-config and started with ```tsx import { RouteDefinition } from "@solidjs/router";...

Cannot run React alongside SolidJS in Astro

The Error:
[vite] The requested module 'solid-js/jsx-dev-runtime' does not provide an export named 'jsxDEV'
[vite] The requested module 'solid-js/jsx-dev-runtime' does not provide an export named 'jsxDEV'
My Astro Config:...

Killing `pnpm dev` results in a defunct `esbuild` process

I've created a fresh solid start project with the default template. I noticed that pressing Ctrl+C causes a esbuild process to linger around in the defunct state.
11169 pts/1 Z 0:00 [esbuild] <defunct>
11169 pts/1 Z 0:00 [esbuild] <defunct>
...

Can't install or get a project started using SolidJs

I've checked some info from all available leads to resolve this but can't get a clear cut answer leading me to believe the issue is from my end but I don't know how to fix is. I've tried: upgrading bun clearing cache using npm...
No description

Why are both class and classList needed?

Hi, I just went through the tutorial on solidjs website. I'm hoping to understand the rationale between having both class and classList instead of combining their functionalities into just class. Thank you for any pointer you can provide!...

Solid Start Internal Fetch

Is there official or unofficial/hacky support for internal fetch at this point? The docs still mention it being passed to API route handlers but I'm not seeing that being the case (anymore?). Anyone figured out a working even hacky solution, directly calling Nitro internals or anything? (I sent this originally in #solidstart but realized this was probably the proper place for it)...

Multiple actions with different unique names seem to trigger each other's submission.result effects

Did I miss something obvious in the reproduction (stackblitz link)? It seams like the two components would be pretty isolated.
1. Open up the browser's console (stackblitz's console is not enough). 2. Let everything load and click the "Go 1" button once 3. Look at the browser's log....

How to prevent page reload on action / query

I use lazy loading, defining preload function, deferStream, and I can see visibly the data added in real time to the page but it forcefully refreshes the page How do I stop this? I didn't think server actions were meant to do this anyways ```ts ...

Preloading route data with context access

I want to preload data for a Home route nested within an authenticated web app. I am doing this by passing a preload function like so:
<Route path="/app/home" component={Home} preload={preloadHome} />
<Route path="/app/home" component={Home} preload={preloadHome} />
...

SSR blank page

Hi everyone, I'm having a little issue in solid start, when I'm using createAsync with the following query, the initial page response is blank, the page has two createAsync, one for the getSession an the other for this request to retrieve the guilds from discord, when there's only the getSession query the initial load of the page has elements rendered from the server and works as expected, I'd appreciate any help on this
No description
Next