SolidJS

S

SolidJS

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

Join

Router issue

If you start a bare new project with the latests versions, it will error out in the dev mode (not in build). I just tried the "basic" template and it throws right at the start. Tried removing the router and that solves the issue if this provides any kind of hint....
No description

Reactivity lost if awaited function precedes?

So this is reactive (reloads the desired componant), but is out of order from what I need to happen. ``` <button id="but_sel" onClick={async (e) => { e.preventDefault();...

Unexpected behaviour on a shuffled hardcoded list with Solid Start

I'm currently experiencing a fascinating issue. Given the code: ``` import { type JSXElement, For, createSignal } from 'solid-js'; ...

Use environment variable in defineConfig

I have an .env.local file
VITE_API_HOST=https://test.com/backend
VITE_API_HOST=https://test.com/backend
...

Share JSX code with a React codebase?

I'm trying to port my React form library to Solid. When I started the process, I realized the JSX for each component was identical to its React counterpart. For most of my components, the only React-specific code in the entire file is the import * as React from 'react' and a React.memo wrapper. The logic for each component is encapsulated in its own bespoke hook, which I can refactor as a Solid hook fairly easily. The code in the component function itself is no different. To avoid copy/pasting the code, is there a way to share JSX between a React codebase and a Solid codebase? Seems like if the actual text of the source file can be the same, there should be some way to do it....

Why is graphql not working with beta 2

only in prod build when using graphql with the new beta 2 i am getting this error Cannot find package 'D:\my-app.output\server\node_modules\graphql\package.json' imported from D:\my-app.output\server\chunks\build\graphql.mjs...
No description

onClick function not rendered in the DOM ?

Hi, I'm trying to make a togglable filter list. I use the For element to loop over my list of filters and create a button for each. ```tsx...

What is the difference between Transition

import { Transition } from 'solid-js/types/reactive/signal'; and import { Transition } from "solid-transition-group" Is this library merged with the original repo or they are different stuff??...

Basic Router

Hey there I want to have a simple Router component that I can use. Problem I'm curently facing is that it doesn't rerender on path change. ```js import { createSignal, onCleanup } from 'solid-js' import Home from '../pages/Home'...

SolidJS Parent keeps passing null into child.

// app.js import { html, createSignal } from "../solid-web/solid-web.js"; import ChildComponent from './ChildComponent.js'; export default function App() {...

How To Setup HTTPS on localhost

I've read through the Vite docs, and they suggest using the @vitejs/plugin-basic-ssl or vite-plugin-mkcert plugin to enable HTTPS on your localhost. I've tried the following two options and neither work. When I install mkcert and configure vite.config.ts as follows, the server won't start when I run npm run dev. ...

`vinxi build` fails with RollupError during unecessary "Preparing app for node-server... "

Hey there, so when I run npm run build which really runs vinxi build as of solid 0.4.* it works locally. But when run as part of a github action, it fails with ```bash...

SolidJS Web renderToString returning undefined

I am trying to use Bun + Elysia for routing and future migration and I was trying to use SolidJS renderToString to render my JSX component to string to do SSR and I got undefied
No description

Stripe Error: "ReferenceError: require is not defined"

I'm trying to add Stripe to a SolidStart project. In the Stripe docs, they ask you to initialize Stripe on the server with: ```typescript...

API Routes Not Found. Can You Help?

I've created a very simplified example to explain the errors I'm receiving when trying to create an API route. First, I created an API route in routes/api/create-payment-intent.ts. This route just logs the request body to keep things simple. ```typescript...

am I using <HttpHeader/> correctly?

I setup a new SolidStart project withpnpm create solid and selected the basic option. I modified src/routes/index.tsx to add <HttpHeader name="x-foo" value="bar"/> like so:```js import { Title } from "@solidjs/meta"; import { HttpHeader } from "@solidjs/start"; import Counter from "~/components/Counter";...

API Proxy in SolidStart

In my application we have a dedicated API backend, on api.example.com, in our vite configuration we have set up a proxy forward with the config below. However when we deply the server with the content from dist/ it dose not use vite to serve the content, but the SolidStart server, are there a way to this "production" to also proxy the requests? ``` export default defineConfig({ plugins: [solid({ ssr: false })],...