TypeError: Cannot read property 'useState' of null
I followed the documentation to use
@trpc/client
in react. I am using Expo React Native
and Expo App Router
here is the provider
the trpc.ts
used in app/_layout.tsx
and tried to use the hooks in the homepage app/index.tsx
package.json
Error ->>
What I am missing?
here is the complete repo
https://github.com/maxios/chatclub-monorepoGitHub
GitHub - maxios/chatclub-monorepo
Contribute to maxios/chatclub-monorepo development by creating an account on GitHub.
Solution:Jump to solution
Downgrade to latest versions not "next" versions. But mainly the mistake was that it is a monorepo so the packages were being installed twice .. once in the package folder and one in the root and I was mixing things up
2 Replies
Solution
Downgrade to latest versions not "next" versions. But mainly the mistake was that it is a monorepo so the packages were being installed twice .. once in the package folder and one in the root and I was mixing things up
I have this exact same issue, and I don't really understand the solution, how can I prevent the packages from being installed twice?