SolidJS

S

SolidJS

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

Join

How do you trigger population of db on startup of app in SolidStart?

How do you trigger population of db on startup of app in SolidStart?

Reconcile not recognising equality in Date() objects

It seems like reconcile() doesn't recognise equality in Date() objects. It recognises strings, numbers, booleans, arrays, objects as equal. It doesn't recognise Date() objects as such. Is it possible to somehow overwrite the equality operation for Date() in reconcile? I mean, it should be comparing by timestamp seconds and recognise when they are equal....

Learning solid and need some understanding

Hey all. I have created a sandbox here: https://playground.solidjs.com/anonymous/797a7004-7703-4e4c-a72d-cef2e4baae26 The react for reference: https://playcode.io/2374626 The result of the toggle, is that a div should expand and then contract. But instead showing and then hiding. 😩 ...

Async Context and Store using route param

I'm sure the answer to this will be deceptively simple but I can't figure it out. In my SolidStart project, a user navigates to a "project" by route, e.g. /project/foo. The file is /project[key].tsx and using const params = useParams() can retrieve params.key perfectly. ...

How to do partial reconcile?

I'd like to use reconcile on a partial / subset of my data. How do you do this? My best idea so far is to write this for loop:...

Understanding Component Render Timings with Contexts and <Show />

Seems like I have a gap in my understanding of something with regards to render timing of components when using things like <Show> with contexts. I have the following: ```ts const Foo = () => { // ...stuff...

Layout Files & Async Loading

Do layout files load differently than regular route files OR in a different order? I keep getting an uncaught exception when deep linking to a route that uses a Layout. I'm not getting the same exception when deep linking to a route that does not use a Layout file. For context, I'm using Capacitor JS to build mobile apps with SolidStart....

Uncaught Client Exception

Hi! I recently deployed my blog website on cloudflare, and I hit a uncaught exception (Error | Uncaught Client Exception) when going to a post that doesn't exists. https://a2va.dev/blog/example It doesn't happens in local where it return the 404 page. Code:...

SolidStart clientside routing issue

My main issue (Solved) I have an app setup with a (root).tsx layout, then my pages all in the corresponding (root) directory under routes. My Layout shows up fine, but when I try to change pages it gets stuck on the same page. Also, when I click to a different route nothing works on that page. Routes only work by directly visiting the URL. Any help to resolve this issue would be greatly appreciated. More on this project: ...

How should useCurrentMatches work?

I'm trying to build a breadcrumb and tried to use useCurrentMatches in my solid-start app. But instead of multiple matches I only get one match of the full path, i.e. ['test1/test2/test3'] instead of ['test1', 'test2', 'test3']. How do I get the route info of all parent routes?

createAsync unexpected behaviour when accessing route through URL, rather than within the app

https://codesandbox.io/p/devbox/pedantic-sea-9z2f4g I have an async function which makes a network request to retrieve some data from the backend. However, it seems as if the network request isn't made (but it is, I've confirmed). When I access the URL directly from the address-bar, a request is made to the backend, response is received but the UI doesn't behave as expected. All works as expected if I access the URL from within the app, e.g by clicking a button that uses navigate(). In the sandbox, an error message should show up in the page - when directly entering the URL in the address bar. This doesn't happen, unless the URL is accessed from within the app, using the link "book" at the top....
No description

How to invalidate cached data or show loading state during data filtering in SolidStart?

I'm working with a query in SolidStart and want to show a loading state when filtering data. Here's my current implementation: ```typescript const getTodos = query(async (type?: string) => { // ...get data ...

The requested module 'solid-js/web' does not provide an export named 'use'

I have a monorepo setup with a solid-start main app, and some packages One of the local packages has a dependency on https://github.com/andi23rosca/tiptap-solid Trying to use the tiptap-solid package results in this error: The requested module 'solid-js/web' does not provide an export named 'use' ...

Solid start isr correct implementation with "fs" as cache driver

can any one please tell me how to use increamental static generation with solid start and if so whe to find the cached static html files in the project after visiting their routes by using "fs" as cache driver then putting the base with the project files...

Compile specific routes into static html

I'm building an app that has the following routes: - home - about - contact - login...

I'm sure this is a stupid question...

I have a a situation where I want to take the current state of part of a store, and create a new store based on said state, which won't affect the original store. This is my current attempt: ```ts const [statStore, setStatStore] = createStore( unwrap(systemStore.stats),...

Don't know how to find config directory ZEBAR

I am currently attempting to rice my windows 11 setup. I have GlazeWM and Zebar installed and running. I am trying to download "neo brutal" which changes the way zebar looks. I have to unzip the contents of neo brutal in the zebar directory but I have no idea where to begin. this is my first time ricing a system. Thanks

Having issues with properly typing a higher-order component

I have a, seemingly, simple HOC that adds styles to a solid-element component: ```ts import type { FunctionComponent } from "component-register"; import type { ComponentType } from "solid-element"; import { onMount } from "solid-js";...
No description

template is not a function with npx serve

I am trying to migrate from vite to solid-start, and I have it prerendering a couple of pages. when I try to load those pages I am receiving npx serve .output/public any guidance on how to troubleshoot this?...
No description

Server-side redirects are done client-side

Why redirects made from a server query is done client-side ? Is it mandatory to use middlewares to have true server redirect ?
No description
Next