mozzius
mozzius
TtRPC
Created by mozzius on 6/9/2023 in #❓-help
React Native/Expo: Uncaught Error: No QueryClient set, use QueryClientProvider to set one
yeah I can confirmed this worked
6 replies
TtRPC
Created by mozzius on 6/9/2023 in #❓-help
React Native/Expo: Uncaught Error: No QueryClient set, use QueryClientProvider to set one
need to solve unrelated errors first before I can say for sure though
6 replies
TtRPC
Created by mozzius on 6/9/2023 in #❓-help
React Native/Expo: Uncaught Error: No QueryClient set, use QueryClientProvider to set one
import { defaultContext } from "@tanstack/react-query"

export const api = createTRPCReact<AppRouter>({
reactQueryContext: defaultContext,
});
import { defaultContext } from "@tanstack/react-query"

export const api = createTRPCReact<AppRouter>({
reactQueryContext: defaultContext,
});
6 replies
TtRPC
Created by mozzius on 6/9/2023 in #❓-help
React Native/Expo: Uncaught Error: No QueryClient set, use QueryClientProvider to set one
I think I may have solved it by doing this:
6 replies
TtRPC
Created by Ali on 3/25/2023 in #❓-help
Using tRPC for uploading audio files
Either that or convert to base64 (worse option but technically possible)
3 replies
TtRPC
Created by mozzius on 3/18/2023 in #❓-help
middleware error with minimal-react example
Got it working - not 100% sure what is was but I synced my fork and ran pnpm build and it's working. I think the issue might have been not running the build command in the root dir
12 replies
TtRPC
Created by Son on 3/21/2023 in #❓-help
How to call useQuery with params inside JSX
Also - you’ve written a function checkIsOwner. You can call hooks inside functions you write, but you must then treat that function like a hook. In your case, you’d want to rename it to useHousingAssocIsOwner(assocId, userId) and then move it to the top level of a component
6 replies
TtRPC
Created by Son on 3/21/2023 in #❓-help
How to call useQuery with params inside JSX
Basically, you can’t call a hook inside a loop (because react then can’t tell which one is which). So you need to move the logic to the top level of a component, and from the look of your code you should just pass userId to <BoardCard> and have it check isOwner inside there
6 replies
TtRPC
Created by Son on 3/21/2023 in #❓-help
How to call useQuery with params inside JSX
In short, you should move your useQuery hook to inside <BoardCard>
6 replies
TtRPC
Created by Son on 3/21/2023 in #❓-help
How to call useQuery with params inside JSX
You’re not following the rules of hooks! https://legacy.reactjs.org/docs/hooks-rules.html
6 replies
TtRPC
Created by mozzius on 3/18/2023 in #❓-help
middleware error with minimal-react example
It was super strange though. Wasn’t saying cors wasn’t installed or anything, just refusing to believe that middleware was an option you could pass
12 replies
TtRPC
Created by mozzius on 3/18/2023 in #❓-help
middleware error with minimal-react example
Yep works all fine on my work laptop, will have to wait until I get home to try again properly
12 replies
TtRPC
Created by mozzius on 3/18/2023 in #❓-help
middleware error with minimal-react example
So it’s definitely v10 :)
12 replies
TtRPC
Created by mozzius on 3/18/2023 in #❓-help
middleware error with minimal-react example
Yeah sorry wasn’t clear - I was trying to use the minimal-react example from the repo (aka I cloned the whole monorepo and tried to run the example)
12 replies