SolidJS

S

SolidJS

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

Join

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

access event.locals from a server function

Hey, I'm new to Solid.js and SolitStart. I'm trying to implement PocketBase auth and got middleware setup: ```ts export default createMiddleware({ onRequest: [...

Help understanding actions and how to manage user session

I want to manage user sessions with firebase auth, how does it actually works? I'm new to SSR frameworks. I want to make it such that my ViewWrapper ("server" I think) component redirects users to /login page, I know I can do auth.currentUser with firebase but that only works on the web client. I was looking into actions in the docs wanting to get to know these patterns better so I can use them properly when required but I can't seem to make much sense on how to use actions in form components or how would I just get a login to work an create a cookie that allows my server components to check whether the user should be redirected to /login or not or just "what would be the correct way of making this work"...

Can I get some assistance with context usage?

I'm new to all of this and I've been trying to learn and understand for about a week now. I can't seem to get the value of 10 to display in the second example. Why does this work ```tsx...

Question about store `range` update API

I've been trying to update the docs for the store page and I noticed an API decision I found surprising. The path syntax for specifying a range of indices to update in an array { from: 3, to: 7 } is inclusive for both start and end. Most similar JS APIs I can think of (.slice for example) are start inclusive, end exclusive. ...

Problem with createAsync.

When my client side try to get data from my server side with createAsync it just will always return a undefined values even when I change the getter to return a string without passing by other function or storage. It is build on the template with-auth of solidStart in typescripts. Here the function on the server side : ``` export const getProjects = cache(async () => { 'use server';...
No description

How does serializing work

I am trying to fetch a object that I got from mongodb, but when doing ` return json(object, { status: 200 })...

Wheel event not firing on chrome 125?

https://playground.solidjs.com/anonymous/9b0f810f-e02c-4dbc-9d89-1132b25e76f2 This worked in chrome v<125, and now doesn't. I have no idea how to debug why. Adding an onMount in order to wait for the div to be connected to DOM fixes it:...

Create Effect not executing

the function getName is working fine and shows the name of the person with id 1 after fetching it from my database but this code doesnt log anything to console not even the debug console.log("running") i did : ```js import { Database } from '~/types'; import { Kysely, PostgresDialect } from 'kysely'; import pkg from 'pg';...

Meta head management with title template?

Any good solutions for this? Similar to the title template that React Helmet or Next SEO provides? titleTemplate="MySite.com - %s"...

Is it possible to do url rewrite like Nextjs in middleware?

Want to build a white-label solution and would like to use a similar approach using middleware to rewrite to a directory based on the host for example. https://github.com/vercel/platforms/blob/main/middleware.ts...

Syntax-sugar for binding state to window or client size?

Is there a syntax-sugar for easily binding state to window size or something? Similar to svelte: ```ts <script>...

Can I make a library package in solid-start

Hi, how can I create a library package in solid-start, like svelte-kit has package option while setup. is there any option like that in solid-start or any other ways? if I build in solid-start it outputs .vinxi and .output instead of dist. I'm really stuck now, any help is appreciated :) ps: I created using solid-lib-starter, but I wonder if theres any way with solid-start itself....

Is it possible to configure a custom RPC endpoint in SolidStart? [Tauri] [CapacitorJS]

I don't know if my question makes much sense but the idea behind it is to enable a tech stack setup... the Dream Multiplatform Developer Experience ( in my opinion hehe ) I'd love to have a project that shares code between a SolidStart website and it's corresponding Mobile App, so I came up with the following idea. 2 builds - SERVER Build: which could be SSR True or SSR False ... ideally SSR True....
No description

Solid as a global variable

I have several small SolidJS JavaScript applications in the same webpage. Currently, each application bundle contains an copy of the SolidJs framework. I would like to use the framework more like with jQuery: is it possible to put the SolidJS framework in a global variable, and then all the SolidJS applications rely on the same global variable?

Is It Possible To Pass An Extra Parameter To A Form Action?

I'm trying to do this: ```typescript const userId = getUserId(); ...

Dynamic imports?

Is there a similar straightforward approach to import modules dynamically in SolidJS? In Svelte it's as simple as: ```ts onMount(async () => {...
No description

How to get and set simple data or a variable in a session?

I tried settings the username and then reading it in a session in the client side in the following code but it gives an error: ` import { useSession } from "vinxi/http"; function getSession() {...