sh03
sh03
Explore posts from servers
TtRPC
Created by jepcd on 6/5/2024 in #❓-help
Using trpcState with Remix
I see. This is awesome. Thank you very much 🙏 I owe you one
11 replies
TtRPC
Created by jepcd on 6/5/2024 in #❓-help
Using trpcState with Remix
Right, but the QueryClient is not typed. Were you able to use tRPC's syntax by any chance for the prefetching? Also they seem to use Hydrate which does not exist anymore in v11
11 replies
TtRPC
Created by jepcd on 6/5/2024 in #❓-help
Using trpcState with Remix
@jepcd Were you able to find a solution?
11 replies
TtRPC
Created by sh03 on 12/12/2024 in #❓-help
Simplifying SSR (e.g. in Next.JS)
Just to be clear I'm not complaining that this hasn't happened yet. I'm just trying to understand why this isn't the best solution.
3 replies
SSolidJS
Created by sh03 on 12/3/2024 in #support
Details on how client code and server code is split
Makes sense but the problem is that the component doesn't get hydrated. See the readme of that repo
9 replies
SSolidJS
Created by sh03 on 12/3/2024 in #support
Details on how client code and server code is split
Thanks anyway
9 replies
SSolidJS
Created by sh03 on 12/3/2024 in #support
Details on how client code and server code is split
I already did here: https://github.com/solidjs/solid-start/issues/1681 but I was just trying to speed up the process
9 replies
SSolidJS
Created by jack on 11/30/2024 in #support
blank page on error
or were you able to resolve yours?
21 replies
SSolidJS
Created by jack on 11/30/2024 in #support
blank page on error
Just to be sure: is this an actual bug or am I missing something stupid?
21 replies
SSolidJS
Created by sh03 on 12/1/2024 in #support
Confusion about `"use server"`
I though action and query is what wrapped the function into a RPC. Also if I omit use server in functions that are called by other use server functions it seems like SolidJS crashes silently while adding use server makes it work so it's unclear whether that is actually required or not.
6 replies
SSolidJS
Created by jack on 11/30/2024 in #support
blank page on error
21 replies
SSolidJS
Created by jack on 11/30/2024 in #support
blank page on error
Yup, done 👍
21 replies
SSolidJS
Created by jack on 11/30/2024 in #support
blank page on error
21 replies
SSolidJS
Created by jack on 11/30/2024 in #support
blank page on error
Another case (and easiest to reproduce): If I have a module x :
import { action } from "@solidjs/router";
import { OAuth2Client } from "google-auth-library";

const getUserFromGoogleCode = async (code: string) => {
const client = new OAuth2Client({});
};

export const signInWithGoogle = action(async (code: string) => {
"use server";

const googleUser = await getUserFromGoogleCode(code);
});
import { action } from "@solidjs/router";
import { OAuth2Client } from "google-auth-library";

const getUserFromGoogleCode = async (code: string) => {
const client = new OAuth2Client({});
};

export const signInWithGoogle = action(async (code: string) => {
"use server";

const googleUser = await getUserFromGoogleCode(code);
});
and call signInWithGoogle from a route page:
import { useAction } from "@solidjs/router";
import { onMount } from "solid-js";
import { signInWithGoogle } from "~/lib/x";

export default function Page() {
const signIn = useAction(signInWithGoogle);

onMount(() => {
console.log("Never shown");
});

return (
<div>Title</div>
);
}
import { useAction } from "@solidjs/router";
import { onMount } from "solid-js";
import { signInWithGoogle } from "~/lib/x";

export default function Page() {
const signIn = useAction(signInWithGoogle);

onMount(() => {
console.log("Never shown");
});

return (
<div>Title</div>
);
}
No errors on console or server but console.log is never shown. If you comment out const signIn = useAction(signInWithGoogle); then the console log is shown on the client as expected.
21 replies
SSolidJS
Created by sh03 on 12/1/2024 in #support
`reload`/`revalidate` + other response (e.g. `json` or `redirect`)
Then it is a mystery. For the time being I'm just converting to using action and query instead. Let's see how that goes.
53 replies
SSolidJS
Created by sh03 on 12/1/2024 in #support
`reload`/`revalidate` + other response (e.g. `json` or `redirect`)
Client side I mean
53 replies
SSolidJS
Created by sh03 on 12/1/2024 in #support
`reload`/`revalidate` + other response (e.g. `json` or `redirect`)
Isn't there also a local cache?
53 replies
SSolidJS
Created by sh03 on 12/1/2024 in #support
`reload`/`revalidate` + other response (e.g. `json` or `redirect`)
It does, but isn't the cache alive for 5 minutes?
53 replies
SSolidJS
Created by sh03 on 12/1/2024 in #support
`reload`/`revalidate` + other response (e.g. `json` or `redirect`)
Same tab. I'm assuming that since no action is called in the flow then the cache is not invalidated.
53 replies
SSolidJS
Created by sh03 on 12/1/2024 in #support
`reload`/`revalidate` + other response (e.g. `json` or `redirect`)
It's unclear what I'd do without you guys. Probably cry in a corner.
53 replies