gwilliamnn
gwilliamnn
TtRPC
Created by gwilliamnn on 7/30/2024 in #❓-help
tRPC with Next Intl
I'm getting errors when use Next Intl with Trpc App Router When I call the route, the middleware from next intl change the route to set the locale first [en-es] and the 404 in the route. https://next-intl-docs.vercel.app/docs/routing/middleware Some one can help?
2 replies
TtRPC
Created by gwilliamnn on 10/24/2023 in #❓-help
I wanna add a localStorage persister, but I'm getting errors for hydration:
I wanna add a localStorage persister, but I'm getting errors for hydration:
const persister = createSyncStoragePersister({
storage: window.localStorage,
throttleTime: 1000,
retry: removeOldestQuery,
serialize: data => JSON.stringify(data),
deserialize: data => JSON.parse(data) as PersistedClient
})

...
return (
<PersistQueryClientProvider
client={queryClient}
persistOptions={{ persister }}
>
<apiClient.Provider client={trpcClient} queryClient={queryClient}>
{props.children}
...
const persister = createSyncStoragePersister({
storage: window.localStorage,
throttleTime: 1000,
retry: removeOldestQuery,
serialize: data => JSON.stringify(data),
deserialize: data => JSON.parse(data) as PersistedClient
})

...
return (
<PersistQueryClientProvider
client={queryClient}
persistOptions={{ persister }}
>
<apiClient.Provider client={trpcClient} queryClient={queryClient}>
{props.children}
...
ERROR:
const persister = createSyncStoragePersister({
> 59 | storage: window.localStorage,
| ^
60 | throttleTime: 1000,
61 | retry: removeOldestQuery,
62 | serialize: data => JSON.stringify(data),
const persister = createSyncStoragePersister({
> 59 | storage: window.localStorage,
| ^
60 | throttleTime: 1000,
61 | retry: removeOldestQuery,
62 | serialize: data => JSON.stringify(data),
3 replies
TtRPC
Created by gwilliamnn on 8/9/2023 in #❓-help
How can I enable experimental Suspense on NextJS
O have a project with trpc (v.10^) and nextjs 13, and I wanna test the suspense query, but not show for me, just the normal useQuery.
2 replies