hrtwrm
hrtwrm
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
I guess I should shouldn't use solidstart then and just stick to solid core?
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
@Madaxen86 Is it common for folks to disable SSR in solid?
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
I created a discussion here on this: https://github.com/solidjs/solid/discussions/2467
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
Why do I have to do this at all? Why can't I just make these calls on the client?
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
When refreshing it does not
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
This works when saving and I see it in the console in the browser
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
import { createEffect, createResource, Show } from "solid-js";
import { ConnectToApi, User } from "api-client";

export default function UserDetails() {
const [userInfo] = createResource(async () => {
const api = await ConnectToApi('http://localhost:5000');
const userInfo = await api.getUserInfo();

return (await userInfo.response?.json()) as User;
});
debugger;

createEffect(() => {
console.log(userInfo);
console.log('entering user details');
});

return (
<>
<Show when={userInfo.loading}>Loading</Show>
<Show when={userInfo.error}>Error</Show>
<Show when={userInfo()}>{userInfo()?.username}</Show>
</>
);
}
import { createEffect, createResource, Show } from "solid-js";
import { ConnectToApi, User } from "api-client";

export default function UserDetails() {
const [userInfo] = createResource(async () => {
const api = await ConnectToApi('http://localhost:5000');
const userInfo = await api.getUserInfo();

return (await userInfo.response?.json()) as User;
});
debugger;

createEffect(() => {
console.log(userInfo);
console.log('entering user details');
});

return (
<>
<Show when={userInfo.loading}>Loading</Show>
<Show when={userInfo.error}>Error</Show>
<Show when={userInfo()}>{userInfo()?.username}</Show>
</>
);
}
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
Because other non authed routes work.
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
That's exactly what's happening.
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
Oh wait I think I figured it out. On a page refresh the code is running in the browser and it's sending along the cookie it needs to authenticate. When it's being refreshed it's running on the server and the cookie is not there for it to be sent along and the call is failing.
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
This is some sort of issue with rendering
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
I am convinced this actually isn't the API library issue
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
On save it does
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
On page refresh it's not mounting the component at all
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
After more playing with it I think this is an HMR issue
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
Thanks for all of your help!
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
I really don't think it's solid now that I've done a lot of testing
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
I will get with the library author and then get back to you
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
Possibly
207 replies
SSolidJS
Created by hrtwrm on 4/6/2025 in #support
data is rendering correctly on file save but not on page refresh
Or the way it's implemented
207 replies