SolidJS

S

SolidJS

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

Join

Keep 'DEV' in production-mode

I would like to make use of the $NAME-symbol from solid-js/store (for my experimentations at https://github.com/bigmistqke/solid-yjs-store, so i can allow multiple store-paths leading to the same reactive value). this is currently only exported as part of DEV afaik. Is there a way how to keep DEV available when doing a production-build?

setting getter in store on already defined key loses reactivity

```const [store, setStore] = createStore({ value: 0, alreadyDefinedKey: {}}); setStore('newKey', { get get() { return store.value...

Can I change the requested URL in a middleware?

I created a page middleware, and I'd like to update the requested URL from foo/bar to bim/bam/boum in the event object? Here's my skeleton code: ```ts export const useBackendPathResolver = ({ forward }: MiddlewareInput) => { return async (event: FetchEvent) => {...

How to set a cookie when using `createRouteData` or `createServerData$`?

For user authentication it may be necessary to set a cookie. In Remix, for example, it is solved so that a loader can either directly return a value or alternatively a Response. The Response can then be used to set the Set-Cookie header. Remix seems to recognize whether the values are returned directly or via a Response, e.g. with json({...}), and interprets the types correctly when calling useLoaderData<typeof loader>(). This does not seem to work with SolidStart. Is there an alte...

Reactive CSS's prefers-color-scheme ?

I want to detect CSS prefers-color-scheme's changed. I can make a event listener like `window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => { ...

Ref is undefined unless I wrap in createEffect, if, and setTimeout

I'm appending a ref to the end of an array. It's always undefined unless I do it like this: createEffect(() => { if (fetchedBookInfo.state === 'ready') setTimeout(() => setAllParagraphs([...allParagraphs(), bookInfoRef]))...

How to make createEffect to mutate two signals by condition?

I have two tabs component. Left tabs, Right Tabs. If user clicks left tabs's item, selected right tabs's item should be de-selected. vice-versa. I made this code. but it doesn't work....

How to recover scroll bar position with Show?

I'm using <Show> to render component. The component has scroll bar. But when I re-render if <Show when = { true } > I lost scroll bar position....

Better way of reusing event listeners for hooks

I have a hook for the window size. ``` import { Accessor, onCleanup, onMount } from 'solid-js'; import { createSignal } from 'solid-js';...

Route actions

So, route actions should be in route files and their dispatchers passed to components? If I want more route actions I just add them below? Is it possible to create route action outside of route file and import only [loading, echo]?...

problem with canvas

I'm having a quite weird problem currently. I am trying to port react-snowfall to solid (https://github.com/apollo79/solid-snowfall) and therefore working with a canvas. The code is, simplified like this: ```ts const [canvasRef, setCanvasRef] = createSignal<HTMLCanvasElement>(null as unknown as HTMLCanvasElement);...

Saving md to jsx files in a folder with vitejs & solid-jsx

hi, i have many md files in a folder and i want vite to convert all of them to jsx and store them in a folder, is this possible?

solid-jsx not working

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/sid/my-app/node_modules/@mdx-js/rollup/index.js from /ho me/sid/my-app/vite.config.js not supported....

EPERM operation not permitted, rmdir

I'm getting this error when I try to visit my dev site ``` 8:43:09 PM [vite] error while updating dependencies: Error: EPERM: operation not permitted, rmdir 'C:\Users...\node_modules.vite\deps'...

Object.keys returns undefined on JSX

```jsx <Show when={Object.keys(fetchBal()["subscription"]).length === 0 }> ... </Show>...

Random errors on previously working project

I have attached a screenshot of my inspect tool. This project worked perfectly yesterday and i have done nothing to change the code. I have no idea what is going on - but the error seems to be coming from solidJS itself. What should i do? I am using SolidStart...

What is the difference between solidJS and solid start? and which one should I use?

Hey, I'm rewriting my project (discord bot) and now I got to the part where I rewrite my dashboard written in ReactJS. I've heard only good things about solidJS and its still quite similar to the react code so I decided to give it a go. But I'm confused about the difference between solid JS and solid start, can somebody explain that to me? ...

EditorJS does not show up

The editor seems to be ready, but doesnt show up in the container console output: I'm ready! (ノ◕ヮ◕)ノ*:・゚✧ Editor component:...

Using express middlewares with solid start node adapter?

Is this possible? Even using global middlewares from express ecosystem would be handy for things like cors, helmet and rate limiting etc.