SolidJS

S

SolidJS

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

Join

Solid.js onClick event is not firing when app is in ShadowRoot.

Solid.js onClick event is not firing when app is in ShadowRoot. Registered clicks only to component root, but not the elements inside the app.

UnoCSS installation issue related to ESM imports

Hi. I just started a brand new solid project and then added UnoCSS. But does not seem to work, it gives the following error:
"unocss/vite" resolved to an ESM file. ESM file cannot be loaded by `require`. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details. [plugin externalize-deps]
"unocss/vite" resolved to an ESM file. ESM file cannot be loaded by `require`. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details. [plugin externalize-deps]
...

Reloading Wasm or Reloading Page

hello everyone. I am trying to host some games I made with Raylib and Zig and compiled to wasm on my website. It kinda works right now, when I first enter the Gamepage the game loads just fine and works fine, but when I route some other page on my website and back to my game page the game doesnt work anymore (using Solid Router). To get it to Work again i have to reload the page. So now I either have to find a way to reload the page when I get rerouted to it by solid router or find a way how to properly unload and reload the wasm an js code. I have a page for my game which contains the HTML Elements I need and a function createScriptLoader to add the required Js scripts to the head of the page when I enter my TestGame Page and removed if i leave it: ```ts var OMITTED_PROPS = ["src"];...

Hydration mismatch

The following code ALWAYS raises hydration mismatch while using solid-start with SSR. But that's not the case when there's no SSR https://playground.solidjs.com/anonymous/eee9dea7-56ba-4e0d-a6b5-fb5e24c778e2...

form action Breaking On Second Submit

To learn about actions, I built a simple notes app. The app displays a list of notes. When you click an edit button, the note text turns into a text input that can be edited. You can see what I'm describing in this code. ```typescript <Show when={isEditing()}...

Is there a way to skip the createResource query until a parameter is available?

Something similar to Tanstack Query or Apollo, maybe? ```ts const [collations] = createResource( async () => {...
No description

On the server, `getRequestEvent()` sometimes returns null

This happens not that frequently, but still happens. I am calling a function from middleware. In that function, I do getRequestEvent and there I am getting it as null...

Component that can render a different tag depending on prop?

I want to make a title that renders a different component depending on the as props you give it. I've written the following component, using a Switch to render the correct component. I am not sure if this is the best way to accomplish what I want. What are your opinions on the way I should have done this? Is this good practice, or is there a cleaner way? Thank you very much for your help and your time! 🙏 ```tsx...

Hydrating SSR - <Hydrate /> doesn't seem to rehydrate dehydrated app

This is what my SSR (and client) entry looks like ```ts import {ErrorBoundary, Hydration, HydrationScript, NoHydration} from "solid-js/web"; import {DefaultLayout} from "./layouts/default";...

revalidate() Not Working As Expected

I'm fetching data from Supabase and using their Realtime feature so I can see live updates. To do that I'm using cache(), createAsync(), and revalidate() It looks like this:...

Destructuring with splitProps

Hi there, Are there any disadvantages of destructuring the local object compared to the second example? ```tsx...

Computations created outside a `createRoot` or `render` will never be disposed

I am migrating my React application to Solid and I am encountering some problems. When using this component that provides me with information about a phone's DDI, I get the error in image 1 and the component is this one: ```...
No description

scroll restoration

For some reason, when using solid-router, it does not do scroll restoration properly. I have a list of elements, I scroll to the bottom, I click on one element and when I hit the back button. Customers expect to go back to the bottom of that list, but for some reason it scrolls to the top. I've tried to debug it, and it does not call scrollToHash so I really don't know what else to look at. Thanks in advance!...

Should I disable `solid/reactivity` linter warning in this case?

I frequently run into this warning with event handlers. Here's an example: ```tsx type PropsType = { something: string;...

`createPresence` with `createResource` and `Suspense`

I'm trying to animate a list of items fetched using createResource. The problem is, however, that fallback stopped working and the list is not being animated at all. Am I missing something here? ```jsx const insightList = (props) => { const [selectedCategory, setSelectedCategory] = createSignal(...

hmr issues

Does anyone else have issues with solid's hmr recently? It happens to me quite often that hmr gets in a sort of loop where it keeps on building the same over and over. I can't kill the process, but have to terminate the terminal window when this happens.

OnMount fired twice for the same component

Hey hey, how it is going? I have this weird situation where I'm seeing a component being mounted twice. I was even able to see 2 DOM nodes mounted and I'd like to collect feedback if this has ever been a thing of it's just a me issue, doing non standard stuff. Code will follow:
No description

Solidjs with AEM Integration

Hello team, I want to build a project in AEM 6.5 with SolidJs . Please help me out how i integrate AEM with SolidJs? There are lot of articles about AEM with React but i didn't find any article about AEM with solidJs.

App.tsx with Solid-transition-group fails to create dom on CSR.

https://github.com/illispi/TransitionCSR Hello I created this small repro for the issue I am having. Issue is on the title. SSR creates dom correctly, but CSR shows empty page after navigating from index.tsx to repro.tsx. If you comment out <TransitionComp> whole site works correctly, but I would like to have that animation....