I saw this demo and it looks really cool
Looking at this code:
|
const [helloResponse, setHelloResponse] = useState(''); |
|
const [posts, setPosts] = useState<{name: string}[]>([]); |
|
|
|
const fetchPosts = () => trpc.query("post.get").then(setPosts) |
It seems like this could be improved with using trpc.useQuery(['post.get']), but unsure if it's possible to:
a) get SSR working with this
b) if the react query cache will be relevant at all / how that would work with fresh in case it uses partial hydration
I saw this demo and it looks really cool
Looking at this code:
fresh-trpc-example/islands/TrpcDemo.tsx
Lines 9 to 12 in 3ce9dd2
It seems like this could be improved with using
trpc.useQuery(['post.get']), but unsure if it's possible to:a) get SSR working with this
b) if the react query cache will be relevant at all / how that would work with fresh in case it uses partial hydration