SolidJS

S

SolidJS

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

Join

How do I recursively wrap a `JSX.Element` with an `Array<FlowComponent>`

```tsx // Let's say we have these values: const children = props.children const layouts = [Layout1, Layout2, Layout3]; ...

Broken vercel deployment with solidstart 1.0.0 and pnpm monorepo - clientOnly does not load

Hi, I'm trying to deploy a solidstart app from a pnpm monorepo to vercel. `import { clientOnly } from "@solidjs/start"; const ClientMapOnlyComponent = clientOnly(() => import("../Map"));...
No description

TransitionGroup from props derived from store duplicates items

I'm very new to solidjs (this is my first project) and I'm trying to migrate a simple react shoppinglist app to it. Very happy with how everything is working so far, but now I've ran into a problem I can't seem to solve. I have the following component to which I'm trying to add animations when items are moved around: ```typescript interface ShoppingListProps {...

VsCode: Cannot find name react

Does anyone know how to fix this annoying warning, this is not happening at all on intellij.
No description

Solid, CDK, Basic S3+CF Distro

Hi there, I've been working on a solid SPA that does not use solid-start. Are there any docs or helpful articles out there with boilerplate CDK construct examples? Also saw SST supports Next, wondering if they've sorted all this out already. Any help you can share would be most appreciated....

createStore doesn't signal with a class as the store, but everything else works.

If I creatgeStore using a class: letss say a simple class like this one: ` class TryMe { 'tryswitch'?: boolean }...

404 in deployment with Vercel

I am trying to implement in Vercel and I can't, I configured defineConfig but nothing, here I leave images for more information.
No description

Accessing server on Network

I tried exposing network host from console as vinxi suggests but it logs nothing when I follow instructions.

NPX failing to install

I am using npm command to install components, specifically SolidUI. But I get error messages from executing the command
npx solidui-cli add drawer
npx solidui-cli add drawer
from different computers. My other laptop has no problem executing the command. Otherwise I get the error message:
Something went wrong while creating your components. Have you ran solidui-cli init?
Something went wrong while creating your components. Have you ran solidui-cli init?
Does anyone else get problem or know how to resolve it?...

SolidStart is it possible to make `load` function on Solid Router async?

My code seems to be working already but I still can't use the data that was loaded as a data that can be used for hydration. (It's not on the returned .html) I followed the instructions on here: https://github.com/solidjs/solid-router?tab=readme-ov-file#data-functions--useroutedata Any tips on this?...
No description

can I configure seroval plugins?

I have a few internal objects which I do return from my server functions, when data is serialised with seroval i do get: The value [object Object] of type "object" cannot be parsed/serialized. error. I can add the ability to serialise/deserialise these objects by seroval by adding a plugin. Still, i do not have idea how i can change the default plugins solid start seroval is using - or if it's even possible...

Split server code from client code

Hey, I am currently working on a project where I'm writing a good amount of server side logic which uses secrets for different things and database stuff which should stay on the server. With solid-start I'm running into a lot of issues where it seems like vite or vinxi or whatever build tool wants to build my server side code for client side use. For example when building my app it looks like it wants to build node builtins used by packages like mongodb and also my own logic for the browser. It doesn't really make any sense to me as I don't use any of that code inside components. I only use e.g. the mongodb package in a file which is just exporting a few wrapper functions for me to query data easier and those functions are only getting used inside server functions....
No description

How to make fetch request on server before sending html to client?

Hello everyone, I have a question about fetching data. I want to fetch data from an api and send html based on what I fetch. ``` import { createResource } from "solid-js"; ...

error handling with lazy

I have a simple SSR setup similar to https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-solid. When lazy loading a route's component that has an error such as Invalid JSX: <div> cannot be child of <p>, the dev server crashes due to an unhandled exception, whereas I would expect the ErrorBoundary to catch it or at least be able to catch it when awaiting renderToStringAsync. Checking the source for lazy, I don't see a catch block when evaluating the promise: https://github...

Run route.load and access return value only once when navigating to page

Hey, I am working on a route where before rendering the route, basic middleware needs to run to check if the client should have access to the route by checking the query parameters of the url and redirect if not. During this check I need to decrypt a query parameter, which can only be done on the server as I don't wanna share my secret key used to decrypt it with the client but I also would like to pass parts of the decrypted data to the route component to render on the page. Here is a small example: ```jsx const getEmail = () => {...
No description

How to handle Loading/Error

I am making calls to server using createAsync it is returning a signal, how should I handle a loading and error states. what is the best practice, and also documentation says that it has these states as properties just like createResourse had but I can't access it.

Integrating external mutable objects

Hey! I'm writing a system for FoundryVTT. It stores relevant game data in Documents, large mutable objects. It also provides Hooks, which are just callbacks, whenever anything happens or changes. I have tested wrapping Documents in createMutable but Foundry itself really doesn't work with that. Is there any reasonable way of still getting fine grained reactivity in this case? Otherwise the options I can see right now are: - just have a big Document signal that sends out an update whenever any property is mutated - convert the Document into an object after every change, and reconcile the difference...

Is there a way to hydrate signals on the server?

I have an AuthContext. I just specifically want to hydrate my user signal in some routes. Is there a way to do this? As far as I know, even in React I can't do this unless I bring in a separate library. Jotai actually does this using useHydrateAtoms. I'm wondering if there's something similar in SolidJS that I can use? (Not Solid Start specific). https://jotai.org/docs/utilities/ssr...

Index page blanks out after coming back from another route

Attaching a screencast. index.tsx does not display but index.mdx displays the content. Weird