Some Call Me Tim
Some Call Me Tim
SSolidJS
Created by Some Call Me Tim on 6/4/2024 in #support
vite-plugin-checker with v1 Start?
I had 'vite-plugin-checker' going with some of the earlier beta Solid Starts, but now it doesn't output anything. Is there a way to see all pending Typescript issues with vinxi etc, or any way to get plugin checker going with app.config.ts? This currently just does nothing, no errors, no output etc:
plugins: [
UnoCSS(),
checker({
typescript: true,
}),
],
plugins: [
UnoCSS(),
checker({
typescript: true,
}),
],
2 replies
SSolidJS
Created by Some Call Me Tim on 5/3/2024 in #support
Router primitives can be only used in side a Route.
No description
35 replies
SSolidJS
Created by Some Call Me Tim on 5/1/2024 in #support
API route in Route Group not picked up?
Migrating to RC1 caused my API routes in Route Groups (https://start.solidjs.com/core-concepts/routing#route-groups) to stop working? For a minimal repro, do a npm init solid@latest and create the file apiget.ts
export function GET() {
return new Response('Hello World');
}
export function GET() {
return new Response('Hello World');
}
placing it here:
src/
routes/
apiget.ts
src/
routes/
apiget.ts
navigating to /apiget returns the proper Hello World. placing it here:
src/
routes/
blah/
apiget.ts
src/
routes/
blah/
apiget.ts
navigating to /blah/apiget returns the proper Hello World. placing it here:
src/
routes/
(blah)/
apiget.ts
src/
routes/
(blah)/
apiget.ts
navigating to /apiget returns a 404 now, whereas in the v.3 version, it worked and would return the proper API response.
9 replies
SSolidJS
Created by Some Call Me Tim on 5/1/2024 in #support
"AsyncLocalStorage" is not exported by "__vite-browser-external"
No description
19 replies
SSolidJS
Created by Some Call Me Tim on 4/19/2024 in #support
How to output raw HTML with SSR Start?
I get a raw html string back from an API and want to just plop the contents before the closing <body> tag. I can do <span innerHTML={apiresponse}/> and it does output the proper HTML, but the HTML contains <script> tags, and needs to be attached to the body. I can't have the span/div/whatever in there. And doing
<Show when={(routeDataResponse() as ApiResponse)}>{response=>response}</Show>
<Show when={(routeDataResponse() as ApiResponse)}>{response=>response}</Show>
just renders it as a string.
4 replies
SSolidJS
Created by Some Call Me Tim on 4/13/2024 in #support
Getting the full domain/url server side
I have a multi tenant SaaS where clients CNAME their own domains to my app. I need to get the domain / url they're using in order to get the correct data from the DB server side. How can I do this?
11 replies
SSolidJS
Created by Some Call Me Tim on 4/11/2024 in #support
Solid Start Route for simple redirect
No description
4 replies
SSolidJS
Created by Some Call Me Tim on 5/3/2023 in #support
Node instance often hanging at 100% CPU.
4 replies
SSolidJS
Created by Some Call Me Tim on 5/3/2023 in #support
Outside a createRoot error when multiple signals in a prop?
Can someone clever give me a quick rundown as to why button 1 generates a warning? Doesn't it just evaluate to boolean anyways? https://playground.solidjs.com/anonymous/d5fe0e41-701e-4360-b991-867f9e57811f
6 replies
SSolidJS
Created by Some Call Me Tim on 3/3/2023 in #support
Solid PointerEvents, Firefox, RequestAnimationFrame and OffsetX/Y
Here's one that took up a bit of my afternoon after I wrote a RAF debouncer. Does Solid 'do' anything with events, like React does, or are they simply browser events? If you do an addEventListener on an element for pointermove, and place these in the handler:
requestAnimationFrame(() => {
console.log(`event RAF`, event.offsetX, event.offsetY);
});

console.log(`event`, event.offsetX, event.offsetY);
requestAnimationFrame(() => {
console.log(`event RAF`, event.offsetX, event.offsetY);
});

console.log(`event`, event.offsetX, event.offsetY);
In Firefox you'll get
19:33:46.808 event RAF 0 0
19:33:46.824 event 1035 164
19:33:46.826 event RAF 0 0
19:33:46.840 event 1039 154
19:33:46.841 event RAF 0 0
19:33:46.808 event RAF 0 0
19:33:46.824 event 1035 164
19:33:46.826 event RAF 0 0
19:33:46.840 event 1039 154
19:33:46.841 event RAF 0 0
in all other browsers, you'll get what you'd expect.
event RAF – 815 – 1064
event RAF – 808 – 1089
event – 802 – 1124
event – 791 – 1182
event RAF – 802 – 1124
event RAF – 791 – 1182
event RAF – 815 – 1064
event RAF – 808 – 1089
event – 802 – 1124
event – 791 – 1182
event RAF – 802 – 1124
event RAF – 791 – 1182
Is this a Firefox bug, or could it possibly be something solid is doing
3 replies
SSolidJS
Created by Some Call Me Tim on 2/8/2023 in #support
Simple SSR server redirect not working
I've found a few similar questions with auth redirects, and I thought I've ticked all the boxes, but I still can't get a server redirect happening as soon as there's an await. Everything works, response is logged properly, but the <div> still loads. As soon as I remove the fetch, the redirect works. I've tried with/without <Suspense>, reading/not reading the routeData, throwing or returning the redirect. To replicate, - create a new solid start typescript/tailwind project. - create blah.tsx in /routes and paste in:
import { createComputed, createEffect, Suspense } from "solid-js";
import { useRouteData } from "solid-start";
import { createServerData$, redirect } from "solid-start/server";

export function routeData() {
return createServerData$(async () => {
const response = await fetch("http://swapi.dev/api/planets/1");

const json = await response.json();
console.log(`fetched, got response`, json);

return redirect(`/about`);
// Also tried throw redirect(`/about`);
});
}

export default function Blah() {
const data = useRouteData();

createEffect(() => {
// Read in discord that you need to access the routeData for it to properly execute??
console.log(`data`, data);
});

return <div>You shouldn't see me.</div>;
}
import { createComputed, createEffect, Suspense } from "solid-js";
import { useRouteData } from "solid-start";
import { createServerData$, redirect } from "solid-start/server";

export function routeData() {
return createServerData$(async () => {
const response = await fetch("http://swapi.dev/api/planets/1");

const json = await response.json();
console.log(`fetched, got response`, json);

return redirect(`/about`);
// Also tried throw redirect(`/about`);
});
}

export default function Blah() {
const data = useRouteData();

createEffect(() => {
// Read in discord that you need to access the routeData for it to properly execute??
console.log(`data`, data);
});

return <div>You shouldn't see me.</div>;
}
- navigate to http://localhost:3000/blah, see the response logged, and also see the forbidden <div> with no redirect. What am I missing!?
24 replies