SolidJS

S

SolidJS

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

Join

null error

I can't even explain an issue, this happens randomly when I'm resizing screen while keeping @corvu/drawer open.
No description

submission error doesn't show when js is disabled

```ts export default function Home() { const form = useSubmission(login); return (...

Questions about migrating from MobX

Hi, SolidJS newbie here with 8 years of MobX React experience. Couple of Qs: 1. I'd like to use class-based stores whenever possible. Is there anything I need to be aware of when using them? 2. Is store performance adequate? For example, can I update a string value at 60 FPS like this?...

subroute not rendering on client nav

I recently started a new branch to add a 3rd party Clerk solid integration to my app, and all of a sudden, all pages that are children of one layout won't render on client nav. i assumed something was wrong with the new dep i added, but i got rid of all references to that and then created a new page in this sub layout, but this also fails to render on client nav. they always all work on full page reload. i assume that it's due to the layout in question, though it looks entirely normal to me (the other layout's subpages render fine on client nav, which is why i think this is the root of the issue)...

Multiplayer in SolidJS

Hi, More of a theoretical question, than a practical one: How would one best handle various amounts of async messages from a single websocket connection using the solidjs reactivity graph? As how this case is different a chat room - not really. However any message needs to be made available to any amount of "listeners" within the same dom (so a lot of passing an Accessor to a signal around potentially), and there is also a performance requirement. So it would be nice if any handlers of some event did so in a defferred fashion - as to not have the ui stutter or accidentally handling events linearly rather than concurrently. ...

load custom css after a package is loaded

perhaps this doesn't belong in this forum, I apoloize I'm trying to override the variables from a css file that belongs to a package, but can't seem to do that because what I write in index.css file gets overriden by the package file's css which loads later. Is there a way for me to import an additional css file after the package is loaded?...

Solid SSR Setup

Hello! I'm trying (and failing) to setup a solid ssr barebones app with rsbuild, fastify, and the solid router. I've tried to browse the web/docs for resources but can't find anything related to implementing ssr.

how to wrap one of the control components

preface: this is probably a silly idea to begin with, but i started trying to implement this and now just want to see it through basically, between actual conditions, and just guarding against async values, i've ended up with a lot of <Show/> on my page. i had an idea to basically wrap <Show /> to create a new component <Suspending />, and instead of taking fallback it takes skeleton as i'm using loading skeletons for fallback on async values. (like i said, i know this is kind of silly as im basically trying to just rename the component). would marginally help me figure out what i'm using as async guard, and what i'm using for other state like mapping a list vs showing empty array state. i tried to implement it as follows by just taking the prop type defs from the Show component (and then i would handle renaming to my liking once i have it working), but the types are not making it through and often becoming any or {}...

Uncaught errors crashing Solid Start server (dev and production)

The only pattern I can really tell is (I think, I'm pretty sure) all the errors I've seen actually crash the server have been thrown by dependencies. I've seen this mostly in API routes but also in some SSR rendered routes, I believe. For a while the dev server would crash sometimes and I just restarted it thinking it was a quirk, but we're starting to see those crashes in production as well now, in a serverless environment (Vercel). Some of those errors were supposed to be caught by an ErrorBoundary during SSR, though I recognize I may have misconfigured something there (might have been an uncaught error during preload, which I can add a catch clause to if I need, that'd be on me). A few have occured for API routes though (I don't think I've seen it with server functions, at least not yet). I would expect the server to log it and throw a 500 or something if there's an uncaught error during an API route call (or just log it and suppress the error, if the response has already been returned but some async code is still running or something). If this is not the case I will have to add a lot of try/catch clauses, but that really seems in scope of the framework....

createResource with a nested source signal doesn't retrigger

```js const [startTime, setStartTime] = createSignal(initialTime); const [events, { refetch }] = createResource( () => ({ service: channel,...

Filtering projects not working

Hi everyone I'm trying to filtering my projects list according to a "tabs", where I click and set the searchParam tab, but isn't working. Only works if I refresh the page. ...

Type for two-element array event handlers

Hi, is there a defined type for two-element array event handlers e.g. onClick={[callback, arg]}. An example code:...

Reflect.getMetadata('design:paramtypes', target) returns undefined for SolidJS app using Vite

I have an application that makes use of Reflect.getMetadata('design:paramtypes', target) which returns undefined. The same library runs perfectly fine in my React/Vite implementation, but in SolidJS context it is not working. I am using the following Vite config ```...

`onMount` not called / Component not rendered?

I seriously do not know why this doesnt work: ```ts export default function About() { const [version, setVersion] = createSignal("Loading..."); ...

fix function running only on build

I want to load the function from this file on mount https://github.com/Aryxst/tauri-app/blob/master/src/use-controller.tsx in home.tsx: ```tsx import { onMount } from 'solid-js';...

Proxy error

Hi, I'm a beginner in Solid and I wrote a little app to learn it. https://github.com/gbagan/nim-machine/blob/test/src/App.tsx In this app, I have created a store state which contains an attribute config (line 42) Then, I wrote a function changeConfig which modifies the store (line 132)...

Sevoral Error while using AbortController

I want to allow users to abort the request. So the flow goes like this, they upload image i set imageLoading signal to true and display cancel button if they click cancel button the same function will be called and it will check if imageLoading is true if it is true I want to abort the request here is some of my code ` const handleFilePreview = async (file) => { setImageLoading(true) abortController = new AbortController();...

Foreign data not rendering unless page is reloaded

I'm trying to write a FFI bridge thingy between rust and typescript (bun, specifically) and I was wondering why my backend's version isnt loading when i go to the About page: ```ts export function getBackendVersion(): string { return dms_version().toString();...
No description

issues with createContext and useContext

Hello, The other day I was working on a context with a store. I'll be the first to admit I am new at solidjs and was mostly following the guides for how to set up a context. The documentation i followed had a default value and setter function that was being added in the createContext function: https://www.solidjs.com/examples/context It's a function with an undefined return as in the example. I did this and then in the .Provider value={} passed a fully defined setter function akin to the one used there and the store accessor value. For some 2 hours I was ripping my hair out because no matter what I did updates were only effecting the page in which they were happening. And when navigating to a different page they would reset. Eventually I realised that defaultValue in createContext was overwriting the change whenever i would navigate out of a page, causing the values to revert to default and the setter function to become an undefined body. This doesn't seem to be the intended behavior?...

Window freezes in dev mode

Quite randomly, under circumstances I haven't figured out yet, the window freezes after the next hot reload.