DINO
DINO3w ago

Is to possible to update the trpc client url?

Hello, I have create my trpc client this way:
trpcClientZS = trpcReactZS.createClient({
links: [
httpBatchLink({
url: `http://192.168.1.2:3000/trpc`,
fetch(url, options) {
return fetch(url, {
...options,
credentials: 'include'
})
},
})
],
transformer: SuperJSON
})
trpcClientZS = trpcReactZS.createClient({
links: [
httpBatchLink({
url: `http://192.168.1.2:3000/trpc`,
fetch(url, options) {
return fetch(url, {
...options,
credentials: 'include'
})
},
})
],
transformer: SuperJSON
})
Is there a way i can change the url in the httpBatchLink when the app is running? I tried to create and override the old instance but it didn't work. Thanks.
0 Replies
No replies yetBe the first to reply to this messageJoin