SolidJS

S

SolidJS

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

Join

how to put the types to the context

this is the erros i get when trying to use the context, i have the type of the array is this ```ts type ServerModel = {...
No description

__vite_ssr_import_1__.template is not a function

I get the error in the topic when I add this import: import { reporter, ValidationMessage } from '@felte/reporter-solid' Obviously I'm using felt forms and it works fine until I add that import. I should also note that I'm using solidJS in astroJS islands. I did run npm i -S @felte/reporter-solid...

<Show> with number | null

What is the recommended way of using the Show component to conditionally render a number that can possibly be null? Currently, if you do the following, the number won't be rendered if its value is zero. ```tsx <Show when={nullableValue()}> {(value) => <>{value()}</>}...

Load unknown jsx component after building

I have a component that can take tabs components with their content from other files without knowing them by advance but I need it to work after building. More specifically, I'm already able to do it all in one piece, each tab is a .jsx from another directory, but I can't do it by individually build each part and the main page I need a built main page than can take my jsx tabs (built or not it doesn't matters) without knowing them by advance, completely independently...
No description

Component does not rerender when the state changes

I have attached the render logic in the attached file, the only relevant missing part is this from the top of the component
const [currentPopup, setPopup] = createSignal(null)
const [currentPopup, setPopup] = createSignal(null)
...

SolidJS, DXOS and reactivity

I am trying to port an app written in React and using DXOS (https://dxos.org). I am running into problems making the UI reactive. With React, the UI was reactive out of the box for any change from DXOS. With SolidJS, it seems like I have to wrap everything in a signal or createMemo to get the UI to react to changes. This adds up to dozens of signals needed to cover all of DXOS (database, authentication, presence etc.). My setup below works for the higher level layers such as client, identity, and spaces`, but anything inside those objects, there is no reactivity. I don't want to wrap everything in signals or stores. I already have local-first state with DXOS, why can I just consume it and have the UI react to changes? https://gist.github.com/bradstedev/96a92966db7ed8702544c00959d9490d...

cascading createRouteData

Hi, I'm using SolidStart sometimes want to create a routeData function with two createRouteData calls where one depends on the other. For example I may have the todo.id but need to fetch the todo to get the todo.listId is there a good pattern to do this? I don't always control the backend so can't fetch both pieces of data in one call (ie. todoWithList or something). TIA.

Idiomatic way to change 2 derived signals when input signal changes

Hi, I've created a discussion at github https://github.com/solidjs/solid/discussions/1953 but it seems not very active place there. Sorry for duplicate....

createResource - SSR / SPA

moved conversation here @Christian

Dynamic Component is not working

Hi, I try to use Dynamic component without success. I have try to replicate the issue in playground and the bug is still present : Playground : https://playground.solidjs.com/anonymous/83f1450a-6060-4ae1-8361-b6436402949b...

Generating Client Only code for static deployment

Hey people, I’m trying to build my solid start app for client use only. We’ve got an ordinary, no bells and whistles, webspace. And my goal is to deploy the solid start app to there. However, I’m not quite sure how to do that. Both when building with the default adapter and SSR turned off, and with the solid-start-static adapter, I only get "server" code. ...

Most concise upsert for store?

I'm wondering if there was a more efficient way of doing an upsert operation? This is what I'm doing currently: ```ts const updateNodes = (node: Node) => { setLocalState(...

Computations created outside a render will never be disposed.

Just wondering whether I can ignore this warning or if its potentially a problem. Basically I have some tab components that are being created in a function and managed in a signal. When a tab is opened I add it to the array and when its closed I remove it from the array. ```ts...

Using Show with createRouteData / useRouteDat

Currently have a project setup with SolidStart, renderStream, and using createRouteData and useRouteData, my issue comes in when I want to use <Show>, I was using this on my original project which was using createResource but since I'm porting to SolidStart I figured I'd use their APIs, and now I'm getting a Hydration issue if I try to use <Show> but works fine if I just use <Suspense>

1. arguments to useTransition() 2. measuring async updates

quicker one this time :) 1. looking at the official docs for useTransition: ``` import { useTransition } from "solid-js"; ...

Can't run npm install

Howdy y'all, I was trying to use the installer for solid start, and I chose the AuthJS option during the installation process. It finished, but when I navigated inside the directory and ran npm install I saw this error
No description

Can't build SolidStart after updating packages

After updating packages, I can't build project both locally and on vercel. I can't find anything relevant to this on google and on this Discord. Do you guys have any idea what could've caused this? ``` [vite:define] Transform failed with 1 error:...
No description

how to trigger the fetcher in createResource if there are multiple signal values?

hello, newbie here. In the document, it could be create a Memo as a group of signals as following. What's changed could be trigger the fetcher? id() or name()? or both? thanks a lot import { createResource, createMemo } from "solid-js";...

Nicest way of having computed properties in a store?

I'm trying to model my store in a concise way, I want to have some base properties, and some computed properties, I think the cleanest way is to use getter/setters but currently they are not reactive as I'm clearly doing something wrong. This is what I have currently: ```ts...