SolidJS

S

SolidJS

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

Join

SolidStart ver.1

everytime I come to test solid, I'm met with issues out-of-the-box Also and Sorry to rant, but everything needs to be looked at. So much junk in the add on libraries or plugins. Does it work, no - do we need it? no get rid of it, yes fix it. Please start paying a team if you can't cope....
No description

having separate layout

Hello guys, I’m new to solid-start I have this inside my routes (app)/login/index.jsx I’m trying to have a layout to it different from the app.jsx ...

Modify dev server port

I am working remotely and I keep getting this error during development: can’t establish a connection to the server at ws://localhost:35999/_build/. Can I somehow fix the port so I can forward it correctly?...

SOLVED: Trigger Side Effects on a Callbacks Dependency Updates

I'm connecting a live feed to solid and currently trying to apply a filter. I filter the feed as it comes in, but if the filter function changes or a reactive value under its scope updates, I need to re-filter from scratch. I'm not sure how to do this... ```ts...

Destructuring functional props remove reactivity ?

Non working example (direct destructuring) : ```jsx <Select placeholder="Select a running app" onChange={setSelectedAppProcess}...

Cannot read properties of null (reading 'nextSibling') ERROR in a hello world simple Solidstart web

i just added a route called docs to a brand new project in routes folder docs.mdx and inside it a text message hello world and when i enter the route it gives me this error Cannot read properties of null (reading 'nextSibling') ../../../solid-js/web/dist/dev.js createRenderEffect(() => (current = insertExpression(parent, array, current, marker, true))); return () => current; }...

Query vs data loader?

```js const getUsers = cache(async () => { "use server"; return store.users.list(); }, "users");...

Deploying static site + hosted functions

Maybe I'm missing something, but I'm wondering why frameworks like SolidStart and NextJS don't support deploying static builds with some dynamic backend functions. Many hosting environments (firebase hosting, Netlify, render.io, ...) support both serving static files, as well as running functions, so it'd be cool if a framework could support this. This could be done by configuring a route prefix, and all of the routes matching that prefix will be part of the server build, all other routes would...

Support for discriminated union types?

Being new to SolidJS, I'm surprised to find that the type checking for discriminated union types in signals or stores seems to be limited. See example below. From my perspective this is very problematic. Am I missing something? Are there any decent workarounds? Plans for support?...

Are Record types a bad type for using stores in Solid?

I posted this on github, its got the examples there. Essentially what I am trying to figure out is if using a Record<string, muhType> data type is the wrong choice for stores. I noticed that when I add a record, Solidjs issues updates where needed. The second you delete a record, it fails to both issue updates and actually remove the record. https://github.com/solidjs/solid/discussions/2150...

ReferenceError: exports is not defined when using islands on dev

First of all, congrats on the v1 launch 🎉 ! I have been playing around over the weekend and hit a snag where I am getting this error log from a node_module exclusively when running islands in development. Using build & start, everything works just fine. I noticed a similar error reported back in 2022 (https://github.com/solidjs/solid-start/issues/221). I'm curious if anyone has figured out the root cause of this yet. Full Error: ```...

FIXED: fetch error on route load function

```ts const getUser = cache(async (username: string) => { const data = await fetch(ApiEndpoints.user.auth.WHO_AM_I, { credentials: "include", });...

Error: Hydration Mismatch.

Why does my project show a hydration error on the first local render, but it loads fine after refreshing the page? Can anyone help me?
No description

How to export setter function for component?

Hi, I'm relatively new to Solid world and whole frontend, I used to work in Java style codebases. I have legacy code, which I'm trying to replace with Solidjs components. Lets presume I have timer component which has time set in creation via prop. Now I need to change time, which is signal created inside component. How to tell component to update its time? Currently am doing this was, but it feels stupid and complicated. Thank you. export type CountDownPanelProps = { template: string; defaultTimestamp: Date;...

createAsync vs createResource and how does Suspense work?

Hello. From doing some searches in here it looks like createAsync (+cache) seems to be the new recommended approach for data loading. I am wondering though, createResource returns a lot of information and options for the request ```...

tree structure: granular updates and retain open state

can only replace the whole tree at once so I tried reconcile with a store, but I don't want all <details> to close when it happens https://playground.solidjs.com/anonymous/c4a3c7e0-c9d8-454f-8a70-7766b67cab75...

deploying a solid js app in render while consuming a backend api

if i'll need to make the code into production & i have the backend url hosted, ```js const BACKEND_URL_API=process.env.BACKEND_URL_API; const BACKEND_URL=process.env.BACKEND_URL;...