ile
ile
SSolidJS
Created by ile on 6/19/2024 in #support
Beginner question about signals
That was quick. Thanks 😄
4 replies
SSolidJS
Created by ile on 5/28/2024 in #support
Using SolidStart's prisma template app, getting odd error & crash from the route.
Probably a bug but I don't know if it's enough to mention it here?
9 replies
SSolidJS
Created by ile on 6/2/2024 in #support
Getting Prisma TypeError in the browser console in a SolidStart app after doing build and start:
I was able to fix it with this (that I found in one of those github issues). app.config.ts:
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
vite: {
ssr: {
external: ["@prisma/client"]
},
resolve: {
alias: {
".prisma/client/index-browser": "./node_modules/.prisma/client/index-browser.js"
}
}
}
});
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
vite: {
ssr: {
external: ["@prisma/client"]
},
resolve: {
alias: {
".prisma/client/index-browser": "./node_modules/.prisma/client/index-browser.js"
}
}
}
});
4 replies
SSolidJS
Created by ile on 6/2/2024 in #support
Getting Prisma TypeError in the browser console in a SolidStart app after doing build and start:
Thanks I was reading those, I found similar, but they didn't help.
4 replies
SSolidJS
Created by ile on 6/1/2024 in #support
Getting random behavior from cache(), createAsync() and signals
Also I'm a bit confused why this is all I need (empty action):
const refreshUser = useAction(action(async () => {}));
const refreshUser = useAction(action(async () => {}));
But I don't complain. It will refresh the user from the database.
16 replies
SSolidJS
Created by ile on 6/1/2024 in #support
Getting random behavior from cache(), createAsync() and signals
I wouldn't have guessed this useAction myself, the docs are quite minimal there at the time. https://docs.solidjs.com/solid-router/reference/data-apis/action#useaction I instantly went for cache validation/cache.set.
16 replies
SSolidJS
Created by ile on 6/1/2024 in #support
Getting random behavior from cache(), createAsync() and signals
The only thing that could look better, IMO, is this:
return { ...data };
return { ...data };
I think this means that if the data comes from the database, it has to be "spread". That's not how one normally gets data from the database.
16 replies
SSolidJS
Created by ile on 6/1/2024 in #support
Getting random behavior from cache(), createAsync() and signals
Looks much better, glad the signal isn't needed. Thanks!
16 replies
SSolidJS
Created by ile on 6/1/2024 in #support
Getting random behavior from cache(), createAsync() and signals
(If you do a hard refresh you probably see the change ... not sure if a refresh is needed)
16 replies
SSolidJS
Created by ile on 6/1/2024 in #support
Getting random behavior from cache(), createAsync() and signals
Ok, I changed it to createAsyncStore, but the strange thing is that it starts to work after about 10 seconds. After 10 seconds it works like I would expect it to, but before 10 seconds the age doesn't increase.
16 replies
SSolidJS
Created by ile on 6/1/2024 in #support
Getting random behavior from cache(), createAsync() and signals
I see, ok. I used ChatGPT for help, so it probably didn't know any better than I do. One strange thing is that I see the age changing once to 36 for example.
16 replies
SSolidJS
Created by ile on 5/28/2024 in #support
Using SolidStart's prisma template app, getting odd error & crash from the route.
I got the same error with the SolidStart tailwincss template app, just out of the box.
9 replies
SSolidJS
Created by ile on 5/28/2024 in #support
Using SolidStart's prisma template app, getting odd error & crash from the route.
In crashing line there is this:
<script type="module" nonce={nonce} async src={import.meta.env.MANIFEST["client"].inputs[import.meta.env.MANIFEST["client"].handler].output.path}/>
<script type="module" nonce={nonce} async src={import.meta.env.MANIFEST["client"].inputs[import.meta.env.MANIFEST["client"].handler].output.path}/>
9 replies
SSolidJS
Created by ile on 5/28/2024 in #support
Using SolidStart's prisma template app, getting odd error & crash from the route.
The crash happens on initial load. If the initial page load works, then it works every time after that (a hard refresh).
9 replies
SSolidJS
Created by ile on 5/28/2024 in #support
Using SolidStart's prisma template app, getting odd error & crash from the route.
It's strange that the console.log() prints this twice and first with undefined. I can see that getUser() works every time, it loads the data from the db correctly. This console.log() is from the server side. On client side the console.log prints only once: sometimes with undefined, sometimes with the correct data. I can create a minimal repo to reproduce.
9 replies