SolidJS

S

SolidJS

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

Join

Issues with creating a new solidstart app

Hi, wanted to checkout solid start, is this an issue in the CLI or on my end? Could someone clarify what might be the cause of this?
No description

solid-router, don't remount when component is the same between routes

Hi, let's say I have this simplified route config ```ts [ { path: "/", component: Home }, { path: "/test", component: Home },...

How do I redirect properly?

```"use server"; import { GoogleAuthProvider, signInAnonymously,...

enableScheduling causes simple solid router examples to crash

Hi, I was going to file this as a bug, but wasn't sure if I should direct it at the router repo or the main solidjs repo. In short, I enabled scheduling with enableScheduling in an App I've been playing around with, in the hopes that it could help a bit with some perf issues. It didn't make too much of a difference, but I forgot to turn enableScheduling back off. When I added Router, I got weird errors that I eventually traced back to enableScheduling. Repro here: https://stackblitz.com/edit/solidjs-templates-gttqb3?file=src%2FApp.tsx,src%2Findex.tsx If this is expected behavior, I'd be curious to understand more 🙂...

SolidJS with Vite vs Solid Start

Hi, I am very new to Web Development in general, and am currently struggling with understanding what a "framework" is comprised of. I started developing my Website in Svelte + SvelteKit and then hit a big problem I couldn't figure out. After that I was looking around for a framework with more control over the reactivity. After playing around with Solid for a few days I started porting what I had already written in my Svelte project and even figured out how to solve my problem. Theen I tried building it for the first time and noticed that SolidJS in itself isn't a whole framework, but SolidStart is (I had CORS related problems with SolidJS when i built it). So I started porting my SolidJS stuff to SolidStart, and now I basically have similar problems as with Svelte + SvelteKit. My main problems are: - Implementing a Theme Switch (auto | light | dark), without having FOUC - Loading .json data (haven't done this in SolidStart yet, just in Svelte and in SolidJS (where it worked))...

Server Action Updates Load Function Server-Side but Stays Stale Client-Side

Hi everyone, I'm facing an issue with a server action and post page in my project and could really use some assistance. Github Repo...

NOT_FOUND

Hello, just tried out SolidStart, I tried to deploy to vercel but I got the error "NOT FOUND". I did the same with netlify and got a similar error of page not found. I am using bun. Here is my package.json { "name": "example-with-tailwindcss",...

Empty Password while updating session.

``` import { createAsync } from "@solidjs/router"; import { updateSession, useSession } from "vinxi/http"; const sessionConfig = {...

Cloud Flare Context is not defined when using Session

Im getting this message every time i try to call a server action that calls useSession hook
Uncaught (in promise) Error: Context is not available
Uncaught (in promise) Error: Context is not available
it only happens on CloudFlare preset builds. On preset cloudflare-modules the error is ...
No description

Problem importing useSession from vinxi/http

I'm currently working on SolidStart with Firebase auth. The problem is whenever I try to use useSession() it raises an error saying Error: Module "node:async_hooks" has been externalized for browser compatibility. Cannot access "node:async_hooks.AsyncLocalStorage" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details. ```...

Universal rendering does not trigger re-render and onMount or onCleanup

I am trying to implement a custom renderer using solid-js/universal but I am not able to get onMount or onCleanup to work, and neither does setCount() re-render. here's my code: ```tsx function Component() { const [count, setCount] = createSignal(0);...

declare types for locals?

i need to declare some locals for RequestEvent ```ts import { User } from "lucia"; declare module "@solidjs/start" {...

How do I set up different languages in routes in SS?

let's say I want: /about-us for English (no en in the url) and /es/sobre-nosotros for Spanish (notice the es that is mandatory)...

Can cache be manually set?

Say I have a export const getList = cache(...) and I access the list using createAsync in multiple places in the app If a user chooses to delete the entire list in some section of the app and the request succeeds, the expected result for the list is now to be empty To my understanding with the current model, the way to update the list to be empty would be to revalidate it, probably in an action, which would trigger another call to the server to get the new list (which is empty) ...

Await a resource inside a function?

This there a function which achieves something similar as my fictional "waitForResource" function here? Or should I refactor my code? ```typescript...

how to load data on link hover?

is there a way to preload data on link hover? <Router preload> didn't do anything.

Trouble With onCleanup()

I'm building a checkout flow with Stripe's embedded checkout form. It works like this. The user clicks a "Buy Now" button on a products page that navigates to a checkout page. The checkout page:...

how do i redirect on load?

i did this ```ts export const route = { load: async () => { "use server";...

Difficulty updating deeply nested store: produce() typed as Partial<T>

I'm experiencing some difficulties updating deeply nested state within a store, specifically with the typings of produce(). The draft parameter is presented as Partial<T>, generally meaning any modifications I need to do to deeply nested objects won't work as I have to continuously check if each level deep exists or not. This behavior seems counter to the intended functionality of the function, so I'm wondering if it's my specific typescript setup that's getting in the way somewhere?...

Where can I find any documentation about `RouteDefinition`?

I can see (in dist/types.d.ts) what properties it has, but I don't know what some of them are for. Or maybe I'm looking in the wrong place? What I need is to attach a "permission name" to each route, and then before rendering the component check if the logged in user has that permission. Is RouteDefinition.info the right place for that?