Questions tagged [trpc]
67 questions
0
votes
1 answer
Get data back when successfully mutated (react-use-form, trpc and prisma)
Currently I have a form with a text input "title". When I submit the form, I can access this property via the submit handler inside my component, like this:
const formSubmit: SubmitHandler = (formData) => {
const { title } =…

Daniel Guedes
- 387
- 1
- 4
- 14
0
votes
0 answers
tRPC not returning error message in IIS hosted Next.js application
In a tRPC router procedure, I have an error condition that will throw a TRPCError with code "BAD_REQUEST" and a custom message. When running this application with npm run dev, it works as expected and the error is returned to the React component…

A. Rahm
- 39
- 4
0
votes
1 answer
How to use storybook with trpc
I have issues creating a story of a component that is using trpc.
Storybook is running, but when I open the story I get the following error:
Cannot destructure property 'client' of 'useContext(...)' as it is null.
TypeError: Cannot destructure…

Erik Metz
- 152
- 1
- 4
0
votes
1 answer
T3 - Importing router from `../trpc`
I am using t3-oss https://github.com/t3-oss.
In latest version of t3, when I want to create a new router and want to import {router} from trpc, I have error:
import { router, publicProcedure, protectedProcedure } from "../trpc";
Module '"../trpc"'…

mxcdh
- 805
- 3
- 10
- 20
0
votes
1 answer
React TS is returning undefined then returns the data
I am using a serverless frame work and tRPC for routes. When I make a call to the backend it will initially be undefined and then return the appropriate data. I am not sure if my call is wrong on the frontend or if there is an issue with retrieving…

BillyG
- 21
- 2
0
votes
0 answers
TRPC query leading to errors on overload
I am working in a new Next JS project and running into an annoying typescript error that I am struggling to reconcile.
I have some data passing setup with TRPC as follows:
const { data: user, isLoading } =…

NickP
- 1,354
- 1
- 21
- 51
-1
votes
1 answer
New to prisma, are these models feasible? T3 stack app
So I want to make an app where a user can create a 'Household' where they can invite other members of their family to have a shared database where they can store items in their pantry/kitchen.
The family members would have their emails added to an…

Mossy82
- 115
- 1
- 9