Closed NoneWofie closed 2 years ago
Hi, I'm trying to implement trpc into React Native and was adding superjson as a transformer. However I couldn't get it to work and can't find any online.
tRPC works, I can query my backend.
Problem
Adding superjson to trpc client.
package.json file { "name": "frontend", "version": "1.0.0", "main": "./src/App.tsx", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@trpc/client": "^9.25.3", "@trpc/react": "^9.25.3", "backend": "1.0.0", "expo": "~45.0.0", "expo-status-bar": "~1.3.0", "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.2", "react-native-web": "0.17.7", "react-query": "^3.39.1", "superjson": "^1.9.1" }, "devDependencies": { "@babel/core": "^7.12.9", "@types/react": "~17.0.21", "@types/react-native": "~0.66.13", "typescript": "~4.3.5" }, "private": true }
{ "name": "frontend", "version": "1.0.0", "main": "./src/App.tsx", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@trpc/client": "^9.25.3", "@trpc/react": "^9.25.3", "backend": "1.0.0", "expo": "~45.0.0", "expo-status-bar": "~1.3.0", "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.2", "react-native-web": "0.17.7", "react-query": "^3.39.1", "superjson": "^1.9.1" }, "devDependencies": { "@babel/core": "^7.12.9", "@types/react": "~17.0.21", "@types/react-native": "~0.66.13", "typescript": "~4.3.5" }, "private": true }
I think this is a duplicate of https://github.com/blitz-js/superjson/issues/190#issuecomment-1139603553. Closing for now, feel free to re-open if that doesn't help.
Hi, it works! thank you <3
Hi, I'm trying to implement trpc into React Native and was adding superjson as a transformer. However I couldn't get it to work and can't find any online.
tRPC works, I can query my backend.
Problem
Adding superjson to trpc client.
package.json file
{ "name": "frontend", "version": "1.0.0", "main": "./src/App.tsx", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@trpc/client": "^9.25.3", "@trpc/react": "^9.25.3", "backend": "1.0.0", "expo": "~45.0.0", "expo-status-bar": "~1.3.0", "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.2", "react-native-web": "0.17.7", "react-query": "^3.39.1", "superjson": "^1.9.1" }, "devDependencies": { "@babel/core": "^7.12.9", "@types/react": "~17.0.21", "@types/react-native": "~0.66.13", "typescript": "~4.3.5" }, "private": true }