SolidJS

S

SolidJS

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

Join

refetch failed resources whenever their sources change?

here's a playground: https://playground.solidjs.com/anonymous/df720f20-833b-420d-af40-f1dc385ceb69 i wrapped the component that imitates data fetching in ErrorBoundary and want the boundary to automatically reset whenever a resource that failed is invalidated...

Invalid Frame Header only on production build websockets

I wrote this simple tutorial, only to realize it's a minimum reproducible example that demonstrates the bug: Steps to Reproduce: ```bash git clone https://github.com/eguneys/solidstart-websockets-chat-tutorial...

production build runs my code twice

I have a solid start app I coded some things. When I run pnpm dev it works fine. But when I do pnpm build, and node .output/index.mjs it logs the things twice on the server log, and my websocket connection breaks with invalid frame header, which is likely related to this running twice thing....

cache doesnt revalidate inside websocket on('message')

I have this: ```tsx await make_game_move({ id: this.game_id, board, status, sans })...

Validation of the props

I've been looking through the documentation and I don't see any way to type props and I have no idea

Hydration errors with inline JSX

```const EyeIcon = (props: { show: boolean }) => { const closedEye = (<svg/>/omitted for brevity/</svg>); const openEye = (<svg/>/omitted for brevity/</svg>); return (<Show when={props.show} fallback={closedEye}> {openEye}...

Delete items from store array issue

I am attempting to remove an array element by one of its objects id properties. this is my method ```const removeSound = async (soundId) => {...

solid-plotly.js a new wrapper for Plotly.js

I could use some more experienced eyes to check the SolidJS implementation details. Eventually I'd like to get this into the official plotly.js distributions. https://github.com/ralphsmith80/solid-plotly.js/tree/main I've posted on there support forum about that as well. ...

Why can I return a function from onMount?

Quick question: I'm allowed to (as in "TypeScript allows me to") return a function from the function I declare inside onMount. The docs does not comment on this (https://docs.solidjs.com/reference/lifecycle/on-mount), so what does it do? When is the returned function run? Example:...

"use server" doesn't work if put at the top of the file

I have this code which causes reactive triggers when user is changed by an useAction: ```tsx import { cache } from "@solidjs/router"; import { useSession } from "vinxi/http";...

How do I do something after a redirect, like reload the page, or in this case reconnect a websocket?

there is no redirect reload, or some kind of hook that gets called after a redirect has happened to the same dynamic route with different params.

SRR And Web Crawlers. Help Me Understand

I just released a new business that has more than 150 pages of docs. I custom-coded the entire site and docs section using SolidStart. I have SSR turned on. Here's my issue. Crawlers aren't finding my pages. I'll give two examples. 1. Algolia just added a crawler to my site. Their crawler only found 2 pages, not 150....

Should I destroy and create a new websocket connection on each page?

Or keep the existing connection throughout different pages, and somehow figure out which page should I handle by different means. I solved all my websocket problems, now this question come to my head, because it takes a split second more to open up the connection and be ready....

How to crossws websocket Resolver API access getSession?

I am trying to use WebSockets with crossws, I have this piece of code at the beginning: ``` const ws = crossws({ async resolve(req) {...

Saving data to a store that has a getter?

i have an issue in that i need to figure out how to add to the scenes[selectedSceneId].sounds array that 2nd line was an idea but not a good one, im guessing i need to use a setter but am not quite sure how. This is my setter:...
No description

npm install is taking forever

I'm working on a solid js project. Pulled an existing codebase from GitHub, but npm install is taking forever. Any help would be appreciated!!

I can't load app.scss inside app.tsx and load globally on all pages

app.tsx has this: import "./app.scss"; Which sets the background color of the page....

__vite-browser-external:node:async_hooks:3 Uncaught Error: Module "node:async_hooks" has been extern

vite-browser-external:node:async_hooks:3 Uncaught 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. at Object.get (vite-browser-external:node:async_hooks:3:11) at http.js:71:53 Here's my code looks like:...

How do I implement a custom fileRouter using vinxi

I need to build a route tree based on some custom configuration.