SolidJS

S

SolidJS

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

Join

solid devtools fails with O.createRoot is not a function

The extension is version 0.27.5 My deps are: ``` "solid-devtools": "^0.27.5", "solid-js": "^1.7.0",...

Should I use <Show>?

<div> {isVisible && <div/>} {isVisible ? <div/> : <span/>} </div> ...

Uncaught The browser resolved template HTML does not match JSX input

Is there any reason I am Currently experiencing this error ``` Uncaught The browser resolved template HTML does not match JSX input: <solid-children></solid-children> ...

Is there a good guide or howto on how to make (non solid) custom web components work with solidstart

I am having hard time understanding how to import CSR rendered custom web components into a solid start app.

on store change

is it possible to run a function after a store value has been changed? ```typescript const Main = () => { const app = useFirebaseApp(); const auth = getAuth(app);...

Type conditional Syntax between props

Hey folks, is there any way to check if IOperation['content'] is of type string since JSX.Element extends from string too ? But like in a way that we know for sure that IOperation['ctx'] will def be defined ? ```tsx export interface IOperation { content: JSX.Element...

SWC Support for SolidJS

Reading vitejs's docs, I've came across SWC and I'm wondering if this could be achievable using this: https://github.com/modderme123/swc-plugin-jsx-dom-expressions I also stumbled upon a github feed discussion where they stated that SSR and refs are not supported, please let me know šŸ™...

How to prevent component from unmounting on navigation?

[SOLVED] I need a specific component to preserve its state as the user is navigating. Currently, the component unmounts and remounts every time the route changes, as you can see in this example. How can I prevent this?...

Avoiding rerenders using `setState + reconcile`

Hi, Currently I have a webworker producing data slices which I want to render. It looks a bit like this:...

How to avoid rerenders when using refetch ?

Hi, I'm trying to build a simple todo list app using Solid. Everything has been fine so far, I really enjoy using Solid! When I decided to add CSS transitions when adding an item to the todo list, I noticed that all items in the list were re-rendered each time they were added. After some investigation, I found that this re-rendering was caused by refetch, which when called causes a re-rendering of the entire list. Using mutate works as expected, so I suspect that the reactivity is lost because the list is replaced with a whole new object. What's the best way to avoid this kind of re-renders?...

How to use JSX.HTMLAttributes<HTMLDivElement>?

`import type { Component, JSX } from 'solid-js' export const LeeCenter:Component<JSX.HTMLAttributes<HTMLDivElement>> = p => ( <div ...

solid build works, vite build doesn't

i have a website that should be SSG'd for use in a Tauri app (https://tauri.app/). when i run solid build, it works fine. vite build doesn't though. am i supposed to worry? ``` PS F:\Rust\windows-assistant> vite build vite v4.4.6 building for production... āœ“ 0 modules transformed....

How to use svg file as component??

I have a lot of svg files (.svg) I want to import it as Solid component. Is there solid primitives? Please don't tell me to use any kind of unknown developers plugins. I want to try official ways....

How do I export components as child objects in a JavaScript object?

Hi Comunnity, i have a quick question: How can I export a component, using Dialog as the root, for example, Dialog.Content? ```jsx...

Navigating to `//` causes an error to be thrown.

Using @solidjs/router, getting a SyntaxError when navigating to a path //, expected to resolve to a NotFound page.

Converting code to ES5

Hello! I need to convert my code to ES5 format and I faced such a problem that const and let variables remain in the assembled project, I expected that all variables will be converted to var, but this did not happen. This is what the assembled project looks like (1 image), I'm not sure, but almost all const and let variables were created by SolidJS This is what my Babel Loader looks like:...

pass session via `<Outlet />`

Is it possible to pass session to outlet like this? It doesn't seem to work. I'm using solid-start alpha btw ```ts export const { routeData, Page } = Sessionize(() => { const session = useRouteData<typeof routeData>(); return (...

Easiest way to spin up an e2e/integration-test setup with solid-start?

Hey folks, I am currently trying to figure out what would be a good way to build an integration and e2e-testing setup for solid-start. Essentially my integration tests should be able to connect to a database and only test server-side logic (for UI stuff I would simply use testing-library). E2E-tests should spin up a database as well as the solid-start application. ...

Container onFocus to observe to subelement focus?

Trying the following, but the handler doesn't seem to be fired when a sidebar item is tab focused using the keyboard: ```jsx return <> <app-sidebar onFocus={() => setSidebarVisible(true)} hidden={!sidebarVisible()}>...

can't reset createInfiniteScroll

hello, at our team we are trying to create infinite scrolling with filters with @solid-primitives/pagination with signal: createInfiniteScroll but we encoutered a problem: You can't reset createInfiniteScroll cleanly, while you can clear all values like this: batch(() => { setPage(0);...