SolidJS

S

SolidJS

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

Join

deploying a solid js app in render while consuming a backend api

if i'll need to make the code into production & i have the backend url hosted, ```js const BACKEND_URL_API=process.env.BACKEND_URL_API; const BACKEND_URL=process.env.BACKEND_URL;...

How do i fetch data correctly in a route?

Hi, I am currently trying to fetch a .json, which I just need to import an array, that I then assign to a signal. But I can't seem to get the path right (do I need API / Proxy?), and before that I had the problem of top level await not being allowed in my build target ES2019. At first I used async functions outside of my exported component, and now currently I am trying to fetch the data with createResource. my current createResource approach ```...

Adding new element to an array before the last element inside solid store

```tsx const [tabStore, setTabStore] = createStore<{ contents: TabContent[] }>({ contents: [ { id: 'original',...

Using SolidStart's prisma template app, getting odd error & crash from the route.

Crash log: ``` /home/ile/src/polvirekisteri/polvet/node_modules/@solidjs/start/dist/server/StartServer.jsx:65 vite_ssr_import_6.useAssets(() => assets.length ? assets.map((m) => vite_ssr_import_8.renderAsset(m)) : void 0);...

Modularizing Components

how would you tackle this, right now i have two different components as pages & now requirements i'm having is that for the third page of the app i'll be using the first page, then the second page the flow of the third page will be to display the table in the first page until he clicks on the CIN, then we display all the products bought from that user, should i make components for the tables and in the props to take params like enableActions to display the crud icons for that specific thing ? ...

Context with Meta

Hi there! 🙂 I have a problem. It seems that when I try to create a custom MetaTitle with SolidMeta, the language context is not being accessed in SSR. Here is my implementation: ```jsx...

Suspense overlay

Hi, I'm currently working on an application where we're performing multiple requests via resources in nested components and using Suspense as a catch all to show a loading indicator would make a lot of sense. The issue is that we do want to show the children of Suspense and the indicator at the same time. I skimmed through the Suspense source and it doesn't seem possible to hook into the existing system since SuspenseContext/getSuspenseContext is not exported to create a separate component. Is it feasible to do this with the current state of Suspense? Something like an overlay prop on Suspense would be ideal eg. ...

is hmr broken? or is this intentional?

create new solid start project run dev command change text in index.tsx route it does a full refresh 🤔...

How to label each page with a title?

This may seem a trivial thing – and maybe it is – but please bear with me (as I have very little experience with Solid yet). I have a Solid app. It has a routes.tsx file which defines routes – a nested array of RouteDefinition. Then I have this: ```tsx render(() => ( <Router root={Layout}>...

Comp is not a function?

Hi all, just started working on SolidStart 1.0 today and as I set a few things up and started the dev server I received an error off the bat. Don't really know where to go from here, so I thought that I might as well ask a question on Discord....
No description

Solidstart with CSR, SSR and SSG?

How to separately implement below methods in SolidStart project? I mean, I wonder how code is different below methods. Example: I saw "use server"; add to run SSR. Client-side rendering (CSR) Server-side rendering (SSR) Static site generation (SSG)...

View transition api and solid start

Has anybody gotten view transition api working reliably with solid router? I tried following code but it doesnt work always for some reason. ```js const VtApi: ParentComponent = (props) => { const transition = (fnStartingTheSynchronousTransition) => {...

Vercel deployment broken

```ts // app.config.ts import { defineConfig } from '@solidjs/start/config' export default defineConfig({})...
No description

Layout Help

How do it so a navbar will show up on / /about /help ...

OAuth2 with Scopes

I've developed a backend (FastAPI) with the OAuth2 with Scopes to restrict access to some methods. Is there any good guides or examples on how to implement the auth logic in Solid.js?...

Do something when a submission ends if there's more than 1 action

Hey everyone. For showing user feedback (like a toast) when an action was done I was checking the action.result inside a createEffect where action is the returned value from useSubmission(myAction) This has been working fine but breaks the moment I use more than one useSubmission in the same component. All effects run on success even if just one action was fired (in my case showing multiple toasts) What's the pattern for handling this?...

Is there a good way to force Solid to fully rerender a component when its props change?

I need to do some procedural computation on my props (I'm trying to draw grid lines based on a size and transformation), so I pretty much need a full rerender whenever the props change - is there a good way to do that?

Maximum call stack size exceeded

Attached my code, but it seems like everytime I input a csv file, I get this maximum call stack size exceeded error, but not sure what I'm doing wrong.. any help is appreciated!

Which way to go? Solid Router's action or SolidStart server function

I recently tried SolidStart and now im confused to what should i use to do some server side procedure... what is the best practice here?...