Metru
Metru
Explore posts from servers
SSolidJS
Created by Metru on 12/27/2023 in #support
I'm having trouble with `session.data` being undefined
Starting from the with-auth example, user_id is sometimes undefined when e.g. refreshing the page.
const session = await getSession()
const user_id = session.data.user_id

console.log({ user_id });
const session = await getSession()
const user_id = session.data.user_id

console.log({ user_id });
I've made a minimal reproduction of the issue here: https://github.com/metruzanca/solidstart-getSession-bug-repro First commit is the initted project, second is the code that's causing the issue. I've also got a video showing off the problem.
35 replies
SSolidJS
Created by Metru on 12/24/2023 in #support
Struggling to get FileRoutes working
Trying to get the FileRouter working in a fresh pnpm create solid https://github.com/metruzanca/solid-fileroutes-not-working Keep getting hydration error in the console
37 replies
RRailway
Created by Metru on 11/7/2023 in #✋|help
Having trouble deploying a Surrealdb instance
No description
43 replies
SSolidJS
Created by Metru on 3/19/2023 in #support
Question about Contexts
In react a common pitfall with contexts is causing unnecessary re-renders to everything subscribed to any piece of the context state, including those just using the methods. (unless you carefully designed the context) Is it safe to assume(/correct to say) that solidjs' contexts are inheritly safer and easier to use since components don't rerender like react and we then only need to worry about using signals/stores adequately?
2 replies
SSolidJS
Created by Metru on 3/16/2023 in #support
Question about onError
onError((err) => {
console.error(err);
})

onMount(() => {
loadUserData(params.username)
.then(setUser)
})
onError((err) => {
console.error(err);
})

onMount(() => {
loadUserData(params.username)
.then(setUser)
})
I've got a throw inside my loadUserData because I thought onError would catch it, so I guess I've misused onError.
11 replies