SolidJS

S

SolidJS

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

Join

Help Me Solve "undefined" warning When Using <Show> Component

I'm using createAsync() to get and order record.
const order = createAsync(() => getOrder(params.chargeId));
const order = createAsync(() => getOrder(params.chargeId));
...

Vercel server call not Allowed: 405 Method Not Allowed

Hi all, I have created a server action which works fine locally: [1st img] -> Successfully prints On Client: Server However, when deploying to vercel, I get the following: [2nd img]...
No description

Vite Certificate

I just ran into problem while creating certificate for localhost, using vite I changed app.config.js the code below is my configuration ` import { defineConfig } from "@solidjs/start/config"; import mkcert from "vite-plugin-mkcert";...

@solidjs/start @solidjs/meta not being SSR'd when resources used, bug or my misuse?

See: https://codesandbox.io/p/devbox/clever-leaf-r4xrg6?file=%2Fsrc%2Froutes%2Fabout.tsx The <title> works fine on the About page, but if you view the HTML document the server provides, it is missing the <title> - it is only added by the client. Everything else renders fine! Cheers!...

Redirect does not happen during load if there is an awaited call before it.

I have this piece of code in Solid Start in my route: ```typescript const getProject = cache(async function ({ id }: { id: string }) { "use server";...

Bug? with ssr, lazy loading, and css.

The image where there is a red line is html after the page is loaded. The other is the html sent by the server. After loading, the page flashes. Access page style is added after the page is loaded, I think it shouldn't be like this. Sorry for my English, I'm not from the USA....
The document sent by the server

how using createRoot?

I am developing a multi-language configuration for my program. I have implemented it in the following way so that it can be called inside the component or in some modules. (If I use context, I can't use it outside the component) However, I get such a warning in the browser console and I'm not sure if such a warning has any positive negative effect. "menus.tsx:10 ...

useNavigate outside of router - for example on authentication faiures?

I have a file of functions for interacting with my backend, I'd like to consolidate some error handling there, for example, if there is an authentication failure, redirect. But as these are not in a router, I can't useNavigate, even though all these functions are called from a component under a router. Is there another strategy I can use here?...

Running into ambiguous error

Hi, I am experiencing a really bizarre error in my click handler. And am not sure on how to debug. I have tried removing the .vite directory and tried rerunning but no luck. Suspiciously this only started when I changed my code slightly from being:...
No description

How to use useSubmission with server action passed to form?

I have a server action that returns data: ```tsx const createItemAction = action(async function (formData) { "use server";...

Struggling with load function and cache revaliation

Hey All, I'm new to solid and am struggling with getting cache revalidation to work with a load function. I've tried to follow the docs as closely as I can, but my load function (and subsequent network request) never seems to get called again. I'm trying to build a basic component that will refetch data filtered based on a selection the user makes: ```...

Basic store example is not reactive

I'm struggling to understand why this code isn't reactive ``` import { createEffect, createMemo, createRoot } from "solid-js/dist/solid.js"; import {...

setStore TypeScript Issue

I have a object store that has an interface like this: ``` export interface config { object1?: type1; object2?: type2;...

Redirect troubles

It's the classic use-case where I want a page to redirect if a user isn't logged in. ```ts // lib/server.ts export const getCurrentUser = cache(async (): Promise<User> => { const event = await getRequestEvent();...

Error: Cannot find cache context

SSR: ```tsx import { cache, createAsync, Route, Router } from "@solidjs/router"; import { Suspense } from "solid-js"; ...

Phosphor icons

Hi Everyone I'm new on Solid JS, and I'm trying to get a cool icon font package. I see that Solid Icons have a lot of icons, but I want to use Phosphor icons. In my case I'm using the web package and import the .css file. I see that exists a package for Solid, but in terms of performance, this usage with the web version is a problem?...

`bun create solid` takes long time to create a new project

I'm using bun to create new project. After running bun create solid and choose with tailwindcss template, the process stuck at the step of Creating Project without any file created in my project folder. Has anyone every come across this issue before?

Is there a convenient way to check the permissions of a user

I wrote it that way, but I don't think it's ideal.
No description
Next