SolidJS

S

SolidJS

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

Join

Context Provider only getting default values - can't update

I'm trying to use a context provider in an astro app which is in a tauri app. While I'd normally wrap the <App /> component in the providers I don't have that option here so I'm wrapping individual components like this: ```js <AdventurerNameProvider client:load> <AdventurerDetails client:load /> </AdventurerNameProvider>...

How to create a library that uses @solidjs/meta as a dependency

I'm writing a library that uses the @solidjs/meta Style component. I should be able to use this component in any Solid Start app because Start wraps everything in MetaProvider. However, I'm getting <MetaProvider /> should be in the tree error. How should I write my package dependencies to make sure the same instance of @solidjs/meta is used?

HttpStatusCode not working

is it just me or <HttpStatusCode/> not working? here's the code I'm trying for the route```js import { HttpStatusCode } from "@solidjs/start" export default () => <>...

use server get cookie

hi I'm currently migrating a project from solid-start@0.3.10 to @solidjs/start@0.4.5 which means I'm converting server$() functions into async "use server" functions. I used to use server$.request.headers.get("cookie") to get cookies. just wondering what the modern equivalent of that is. thanks....

Solidjs navbar and router setup problem

Can anyone help, my Index.jsx is as under: import { render } from "solid-js/web"; import { Router } from "@solidjs/router"; import "./index.css"; import App from "./App";...

Building app for static file hosting

Is it possible to build a Solid Start app such that it can be hosted on a static file hosting platform? Since I'm not using ssr, and have set start.ssr to false, I really don't see why I should build for a node server. Is there any way to change it?

Routing in SolidJS "microfrontend"

Hello, I'm sorry I allowed myself to make another post because I couldn't find how to add pictures to my previous one. I'll start again, perhaps with a better explanation of my issue. I am working on a big app (MyApp on the pictures) which role is to share user connection and navigation between several modules (which are pretty big too, that's why I chose to make them as separate apps)....
No description

Routing in SolidJS microfrontend

Hey, I'm working on a big app "portal" that would contain several modules, separated in different apps. At first I worked on one of the modules as a standalone app. It has its own routing and works when I run it as an app. I can go to /mymodule/mypage/mything?param1=param1&param2=param2, using the app's navigation buttons or the browser. I recently made the change to export it as a library, so in the portal app I can call <MyModule ...props /> when I try to access the page /mymodule (the portal app also has its own routing and allows the user to navigate through the different modules)....

Should you still use the routeData function?

The docs got removed for the routeData functions. Does it mean this feature is deprecated or will they be back in the futur? https://start.solidjs.com/api/useRouteData...
No description

SolidJS UI library + Astro

Hey, would anyone happen to have experience using a UI library together with Astro? I can get it working if I just export some simple components, but if I then add an import to another SolidJS library (eg. @kobalte/core or @ark-ui/solid to help build my primitives), then I run into: ``` The requested module 'solid-js/web' does not provide an export named 'effect'...

Nested Reactivity not working

Hi, i'm trying to figure out why my a particular component (combatdisplay.jsx) of my solidjs project isn't updating when I change a deeply nested property in a store through the deployCard function in my stores class (context.jsx). What's weird is that all the other components in my project that also react to nested properties works without issue, so I am very confused as to why it is not working for this particular component When debugging myself, I found that the backend data updating code looks to be right, as it does update values in the store correctly so I don't believe there's anything wrong with that. Simply put, the component just doesn't react to updated data. I've also rewritten the deployCard functions two different ways (one with and without using produce), but the component still doesn't update. Here is a github repo for all the code...

createMemo with `{equals: false}` not reactive

I am wondering if this is a bug or not: ```tsx function Counter() { const [count, setCount] = createSignal(1);...

Using a function outside of components

Hi all, I've come across an interesting situation. I am currently doing a project using SolidJS. I have a hook (hello React) that handles authentication: ```js import { createSignal } from "solid-js"; ...

Make sure your app is wrapped in a <Router />

I have a mini app which contains its own route path something like below . This root component is exported out and is being used in main app as a package dependency. Below is the usage mini-app code ``` <Route path="/path1" component={MainLayout}> <Route path="/" element={<Navigate href='/home'/>}/>...

TypeScript type for classes that extend class

This Stack Overflow question is what I'm asking, but none of the answers provide intellisense for the function argument: https://stackoverflow.com/questions/76913841/generic-type-to-specify-a-class-which-extends-another I'd like to be able to do something like: ```ts // These class would be accepted:...

Store item = undefined, causes typescript error

items[item.id] = undefined
items[item.id] = undefined
throws: ```ts...

How to keep store in sync with supabase's multitab session?

A logged in user's data is stored in store: ```ts const initialState = { id: null, username: null,...

noob question regarding solid-router

Hey guys, I'm running through this tutorial on Solid-JS as I am new to web dev, I got to the video on the solid-router and noted it broke so I ran through the documentation and saw there were changes made recently. I tried figuring it out myself but my page still doesn't render the Home component.
No description

Solid-UI The `border-border` class does not exist.

Recently got started with solid-ui and i love it a lot, however when i add it to projects where i am using daisyui as my styling system (just a wrapper ontop of tailwindcss) i get an error:
The `border-border` class does not exist. If `border-border` is a custom class, make sure it is defined within a `@layer` directive.
The `border-border` class does not exist. If `border-border` is a custom class, make sure it is defined within a `@layer` directive.
...

How to Inform children of the active status of it's parent <A/>

I'm looking at something like: ```ts <A href=".." class=".." activeClass=".."> {({ active }) => <span classList={{ "my-class": active }}>..</span>...