SolidJS

S

SolidJS

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

Join

I'm having issues deployment a Solid start site to cloudflare pages

The site is working on local and I already follow the steps on start-cloudflare-pages but then I use the command: CLOUDFLARE_ACCOUNT_ID=MY_ACCOUINT npx wrangler pages publish dist/public --project-name=PROJECT_Name I got this error...

Github pages

Does anyone know if a SolidJS app will work with GitHub pages?

Rerender child component with updated props

I've built a pagination component that takes a prop called totalPages, I've created a signal for this as I only know the totalPages once my createResource is done loading. However, the child component does not rerender when totalPages is updated. How do I make the component update itself? Parent Code ```javascript...

Warning computations created outside a `createRoot`....

I have a code like this. Wrapping store using createRoot doesn't solve this. 'createEffect' actually makes the warning. How to solve it?...

Computed getter for store?

I see I have two ways computed getter for store. 1. Using 'get' inside store. 2. Creating function outside store like I did for signal. ...

Vite compiles .jsx files from node_modules as react files

Hey, I'm kind of new to Solid (coming from react, reactivity really bought me in) and it seems like vite isn't working as indented. I've created a new project with npx degit solidjs/templates/ts-tailwindcss my-solid-project, installed solid-query and ran the app. Unfortunately nothing wanted to render and there was an error in the console Uncaught ReferenceError: React is not defined in the QueryClientProvider.jsx. Seeing that I was kind of confused since I'm not using react, when inspec...

How to bind element width, height to signal?

My <div>'s size will be changed by parent or css class. I want to bind div's offsetWidth, offsetHeight to signal inside component. Then I want to do something with the signals. How can I do it? I know there is 'ref' attribute. ...

Pagination Component

Hi all, I'm a beginning developer so bear with me while I go through these noob mistakes. I'm trying to utilize a React component called rc-pagination however when I follow their example my page stops loading and I get an error. I'm basically looking for an easy way to start using a proper pagination component similar to what Ant Design offers. The one I tried implementing: https://pagination-react-component.vercel.app/demo/more#more ...

SolidStart prod build fails to start on `require()`

My site uses a library algosdk that has dependencies which utilize require() in them, which cause the production build to fail with the below error.
```undefined:1 require('crypto') ^...

Show-tag with callback for multiple values

hi all 👋 Is there currently a way to use the Show tag in the callback-form to validate and pass on multiple values? Something like ```<Show when={[var1, var2]} keyed> { ([var1, var2]) => (...var1_and_var2_are_trueish)...

Props

I read on the getting started tutorial that it's best practice not to destructure props object in the function assignment of a component as this will make the properties less reactive. I was wandering if it was ok to destructure the props object in the function body itself?...

Rate limit SolidStart API routes

Hello! I was wondering how I can implement an API rate limit solution with the SolidStart API routes.

HMR of solid-element for Vite ?

Does anyone know how to make HMR works for solid-element when using vite? I found the doc at https://github.com/solidjs/solid/tree/main/packages/solid-element#hot-module-replacement-new it's only talks about webpack and parcel....

Import JS library via script tag

A JS SDK library I need to use recommends importing a browser bundle by adding a script tag to index.html: ```<script src="https://unpkg.com/algosdk@v1.23.2/dist/browser/algosdk.min.js" integrity="sha384-1gIB0FiLMNmJ7adAfBOdH20Mnw0DZarB9D3PTozUAhKn/uT9CpHdaSbBIpmZTgrU"...

Where are real word example using SolidJS?

Can someone tell me famous apps using SolidJS ? I would like to see their codes in github.

storing a function inside a store

is it currently possible to store a function inside a store? it seems like they are being called immediately when I enter them in a store atm. ``` const [state, setState] = createStore<{ test?: () => number }>({ test: undefined,...

How to add child component to component?

How to do it like... <MyComponent> <ChildComponent />...

Template seems to have an issue.

I created a new repo and filled it using pnpx degit solidjs/templates/js . --force and pnpm i and I get the error in jsconfig.json that the definition file for vite/client is missing I attempted to start the template anyway with pnpm serve and I just get Cannot GET / please ping if you have replies...

Handling forms

Is there a popular forms library between Solid js'ers? What do you guys use?...

Is this right store?

I made store which has multiple pages, and selectedPageIndex like this picture. I get selected page's value, and set selected page value like this. Is this correct?...