Nathan
Hydration problem in Solid Start
In the following code, I'm using Tanstack Query to fetch some data needed to render a form. When I navigate to the page using client-side navigation (by clicking a link), the form is not visible. It is, however, present on the DOM, but without hydration keys. If I then refresh the page, the form becomes visible, and its elements in the DOM get hydration keys. Any idea what's causing this?
3 replies
Solid-Start preloads 404 page instead of OAuth API route
I'm trying to set up OAuth in a Solid-Start project. I have a API route for a GET request to redirect to the 3rd-party server which works when accessed directly. However, when I try to make a link to that route, the app preloads the 404 page, instead. How can I get it to navigate to the correct route?
9 replies
Accessing grandchildren
I'm using Astro, and I have an Astro component that passes children to a Solid component. I'd like to iterate over these children, but, unfortunately, Astro wraps them all in a
<astro-slot>
element. Is there a way to access the children of this element through props.children
?7 replies
`ReferenceError: Request is not Defined` on Node 18
After adding
solid-start-netlify
to my project, I get ReferenceError: Request is not defined
when I run solid-start start
. I know that this can happen with older versions of Node, but I'm running version 18. Any idea what's causing this?2 replies
Confusion with suspense and nested routeData
I have two pages relying on the same data, so I put them in routes Moreover, while Page2 shows the resource stuck on loading on initial page load, the Finally, if I load Page2, then navigate to the working Page1, then navigate back, everything is loaded.
There seems to be something I'm not getting about routeData, suspense, and resources. Can anybody help me out?
app/page1
and app/page2
. My goal is to have route data for the app
route forwarded to the two pages. The idea is to have a routes/app.tsx
that looks something like this:
Then, in each of app/page1.tsx
and app/page2.tsx
,
I'm having a couple issues. First of all, in order to get anything to load, I needed to shove the following hack into app.tsx
:
Secondly, while Page1 works on initial page load, Page2 does not, and I struggle to find a difference in the data loading between them. <Suspense>
isn't rendering the fallback.1 replies
"Make sure your app is wrapped in a `<Router>`" with Lucia-Auth
I'm trying to move over to Lucia-Auth, and I'm following this guide. I have a routeData function that looks like this:
But it gives me a "Make sure your app is wrapped in a
<Router>
" error. My app has the usual <FileRoutes />
wrapped in a <Routes>
tag, so I'm not sure what the problem is.2 replies
Testing difficulties in solid-start
I'm running into some perplexing errors with Vitest in my SSR-enabled Solid Start app. In the imports two files, I get
In at least one of the test files, I've done my best to abstract the component being tested away from the routing, but I'm still getting this error. My
Cannot set properties of undefined (setting 'modhash')
. In one, it's caused by import { isBefore, parseISO } from "date-fns"
. In the other, by import { CentralStoreContext } from "../root"
.In at least one of the test files, I've done my best to abstract the component being tested away from the routing, but I'm still getting this error. My
root.tsx
:
And my vitest.config.ts
:
26 replies
Trouble porting a React hook to Solid
I'm trying to port the usePlaidLink hook to Solid. But after making some adjustments from the React version, I'm getting a stack overflow error in a basic rendering test. This is what I have:
I can tell it's cycling endlessly through the exit,
setPlaid(next)
, and onCleanup
phases of the createEffect
. Any idea what's happening?3 replies