dtnc
dtnc
Explore posts from servers
SSolidJS
Created by dtnc on 4/17/2025 in #support
Clearing form after action in solid-start
Searches on this discord return old posts that suggest using createEffect on submission.pending along with a ref to the form to do clearing. I'm just checking if this is still the right way to handle form clearing after successful actions. Please let me know if you have a better suggestion. Thanks
3 replies
SSolidJS
Created by dtnc on 4/17/2025 in #support
Would this break reactivity?
I'm new to signals. The solidstart tutorial mentioned that destructuring may break reactivity in components. I don't fully understand that just yet and wonder if that means the following hook would break reactivity. This is a convenience hook I'm writing to simplify usage of the better-auth useSession hook. If it can potentially break reactivty, how would you suggest accomplishing the goal of unpacking the data field into user and session?
export function useUserSession() {
const sData = useSession()

const unpacked = () => {
const { data, ...statusProps } = sData()

return {
user: data?.user,
session: data?.session,
isAuthenticated: data?.session.token,
...statusProps
}
}
return unpacked
}
export function useUserSession() {
const sData = useSession()

const unpacked = () => {
const { data, ...statusProps } = sData()

return {
user: data?.user,
session: data?.session,
isAuthenticated: data?.session.token,
...statusProps
}
}
return unpacked
}
5 replies
SSolidJS
Created by dtnc on 4/14/2025 in #support
Why are both class and classList needed?
Hi, I just went through the tutorial on solidjs website. I'm hoping to understand the rationale between having both class and classList instead of combining their functionalities into just class. Thank you for any pointer you can provide!
3 replies
CDCloudflare Developers
Created by dtnc on 4/12/2025 in #workers-help
how to view console.log when running via `wrangler dev --remote`
Hi. I'm using react-router v7 and tinkering with browser bindings. I'm at a loss at how to observe server-side console.log when running wranger dev in --remote mode. I only see a bunch of [wrangler:inf] GET ... logs on the terminal. Help please!
3 replies