Samual 🦢
Samual 🦢
Explore posts from servers
SSolidJS
Created by Samual 🦢 on 1/6/2025 in #support
abort `"user server"` function call
so does this mean I can't use "use server"?
7 replies
SSolidJS
Created by Samual 🦢 on 1/6/2025 in #support
abort `"user server"` function call
I'm just using the self hosted node platform
7 replies
DDeno
Created by Samual 🦢 on 11/25/2024 in #help
Build tool generate TypeScript for JSR
for anyone else who finds this: you don't need to generate TypeScript files, you can generate JavaScript files that have // @ts-self-types="./<name>.d.ts comments at the top (where <name> is replaced with the name of the file)
6 replies
DDeno
Created by Samual 🦢 on 11/25/2024 in #help
Build tool generate TypeScript for JSR
yep
6 replies
DDeno
Created by Samual 🦢 on 11/25/2024 in #help
Build tool generate TypeScript for JSR
because I have other transforms other than just TypeScript to JavaScript that I use
6 replies
SSolidJS
Created by Samual 🦢 on 9/19/2024 in #support
modern equivalent of `createRouteData()`
okay so I've simplified it to
const dummyCacheThing = cache(async () => 1, "dummyCacheThing")

const [ routeData ] = createResource(() => {
dummyCacheThing()
return /* route data here */
}, v => v)

// logged on route change and form submissions
createEffect(() => console.log(routeData()))
const dummyCacheThing = cache(async () => 1, "dummyCacheThing")

const [ routeData ] = createResource(() => {
dummyCacheThing()
return /* route data here */
}, v => v)

// logged on route change and form submissions
createEffect(() => console.log(routeData()))
but I'm not too sure why this works. and why does commenting out the dummyCacheThing() line stop it from working?
11 replies
SSolidJS
Created by Samual 🦢 on 9/19/2024 in #support
modern equivalent of `createRouteData()`
nah don't worry I think it was user error
11 replies
SSolidJS
Created by Samual 🦢 on 9/19/2024 in #support
modern equivalent of `createRouteData()`
yeah once again, I don't want to be directly referencing specific resources either for the same reason stated above
11 replies
SSolidJS
Created by Samual 🦢 on 9/19/2024 in #support
modern equivalent of `createRouteData()`
also please can you link the docs page for useSubmission(), I can't seem to find it
11 replies
SSolidJS
Created by Samual 🦢 on 9/19/2024 in #support
modern equivalent of `createRouteData()`
and it's not out of laziness. referencing actions directly means I can't write code that can be used generically throughout my app
11 replies
SSolidJS
Created by Samual 🦢 on 9/19/2024 in #support
modern equivalent of `createRouteData()`
I don't want to be directly referencing actions
11 replies
SSolidJS
Created by KamehamehaNudel on 1/31/2024 in #support
Escape Suspense when using resources?
I had to do this to avoid suspense for a specific resource:
const [ foo ] = createResource(
() => {
// ...
},
async bar => {
// ...
}
)

const getFoo = createMemo(() => foo.loading ? undefined : foo())
const [ foo ] = createResource(
() => {
// ...
},
async bar => {
// ...
}
)

const getFoo = createMemo(() => foo.loading ? undefined : foo())
and then use getFoo() instead of foo directly
18 replies
SSolidJS
Created by Samual 🦢 on 1/17/2024 in #support
how do you get a route to respond with an http header?
I've figured it out getRequestEvent()?.node.res.appendHeader("x-foo", "bar")
6 replies
SSolidJS
Created by Samual 🦢 on 1/17/2024 in #support
how do you get a route to respond with an http header?
setting a cookie
6 replies
SSolidJS
Created by Samual 🦢 on 1/17/2024 in #support
how do you get a route to respond with an http header?
nope, a regular route
6 replies
SSolidJS
Created by Samual 🦢 on 1/9/2024 in #support
use server get cookie
thank you
3 replies
SSolidJS
Created by Samual 🦢 on 10/27/2023 in #support
mark module or just variable as secret to stop being bundled into client
I'm guessing there isn't
3 replies
SSolidJS
Created by Samual 🦢 on 10/27/2023 in #support
mark module or just variable as secret to stop being bundled into client
if there isn't just say
3 replies
SSolidJS
Created by Samual 🦢 on 9/7/2023 in #support
set response header from within `createServerData$()` callback
ty
8 replies
SSolidJS
Created by Samual 🦢 on 9/7/2023 in #support
set response header from within `createServerData$()` callback
8 replies