Questions tagged [solid-js]

For questions related to the Solid Javascript framework (see solidjs.com)

Solid is a JavaScript library with built-in state management and fine grained reactivity for creating user interfaces.

It is a high performance alternative to React which compiles to real DOM nodes. It supports SSR, streaming and progressive hydration.

242 questions
1
vote
1 answer

What's the difference between Accessor and just SomeType in Typescript?

I'm doing a todo list app in Typescript using Solid. I defined a Todo type as follows: type Todo = { text: string; complete: boolean; }; And later I want to check if all the things to do in the day are done so I can increment my streak. For…
dudu-av
  • 99
  • 4
1
vote
1 answer

Rendering remote data using the fetch API in SolidJS

I am a newbie using Solid JS (and JS altogether for that matter) and I'm facing a seemingly strange behaviour when trying to populate a (custom) component using data from an API using fetch(). This is my
: import { Component, For }…
1
vote
1 answer

Autocorrection with eslint's solid/event-handlers results in typescript errors

I am using solid/event-handlers rule of eslint-plugin-solid with eslint. After automatically repairing the error that occurred in onDblClick, it became onDoubleClick and an error occurred in typescript. Why does eslint-plugin-solid auto-repair…
ymk
  • 13
  • 4
1
vote
1 answer

Render SolidJS component based on get parameter

I have a simple SolidJS component: export const PageContent: Component<{content: string}> = (props) => { } Now, since I would like to build a web app with many pages, and I would like to keep things like header, footer, nav, etc. the same…
1
vote
1 answer

How do you properly deploy SolidJS app to Netlify

I have successfully deployed a SolidJS app to netlify just fine, but I ran into an issue where additional routes other than / cause the app to crash. Having previously deployed React apps to Netlify, adding a _redirects in the public folder works…
Darien Miller
  • 651
  • 2
  • 7
  • 16
1
vote
2 answers

How to access values ​stored on a browser from a code file using sessionStorage in javascript?

I have stored the data returned by a form of my application on the browser from sessionStorage. However I cannot access the stored values ​​from another code file in my project and it gives me no error. I was expecting to be able to access these…
Goune Kenfack
  • 107
  • 1
  • 7
1
vote
0 answers

Type error: loading is not a function in solidjs

I'm working on the user account creation feature of my solid-js application. The problem is that when I click on the button leading to the user account creation form, it does not react and in browser command line, I get the error: Type error:…
Goune Kenfack
  • 107
  • 1
  • 7
1
vote
2 answers

Button onClick not changing dynamically in Solid JS

I want to update the behaviour of a button onClick based on a boolean signal in solid js but it does not update when the signal changes. I tried using refs but no results. const [flag, setFlag] = createSignal(false) const trueFunc = () =>…
Ashis Paul
  • 33
  • 4
1
vote
3 answers

How do you get an HTML string from JSX without React. I'm using SolidJS for example

I'm not using React, so this won't work ReactDomServer.renderToString(
p
) I'm currently rendering the jsx in a hidden div with an id on the browser and then using document.getElementById(id).outerHTML to get the HTML, but I'm wondering…
chad steele
  • 828
  • 9
  • 13
1
vote
1 answer

is there an event like onRouteChange in SolidJs?

I need to run some logic every time the url changes. My application uses solid-app-router https://github.com/solidjs/solid-router How can I subscribe to router changes in SolidJS?
Felipe Chernicharo
  • 3,619
  • 2
  • 24
  • 32
1
vote
1 answer

How to build a floating button in Tailwindcss?

I work in solid-js and I would like to add a floating button to the far right of a screen in my application. After reading this article on creating floats in Tailwindcss..., I wrote the following code: export default function SearchEngine() { …
gks
  • 191
  • 1
  • 4
  • 18
1
vote
2 answers

Publish SolidJS Typescript to npm

I have a solidJS typescript UI component that I have published to the npm registry. The project is setup like this: |-app |-index.html |-src |-index.tsx |-App.tsx |-utils |- ... |-components |- .... …
Felipe Chernicharo
  • 3,619
  • 2
  • 24
  • 32
1
vote
1 answer

"TypeError: Cannot read properties of undefined (reading 'name')" on my node_modules file

I'm working on a solid-js project. For some time now, none of the buttons in my application react when clicked. Although I did not make any code changes before the bug appeared. To fix this issue related to my buttons, I deleted then reinstalled my…
gks
  • 191
  • 1
  • 4
  • 18
1
vote
1 answer

Solid App Router element not rendering component - Object Object

Just started using SolidJS and solid router, already stuck at the route not rendering the component inside "element". Instead it's showing "[object Object][object…
Michael Soriano
  • 257
  • 2
  • 9
1
vote
1 answer

SolidJS: ! zlib: unexpected end of file

I keep running into this error when attempting to create a solidjs app using npx degit solidjs/templates/js my-app. Current setup is zsh on Mac
Sammy
  • 41
  • 4