Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
4 replies
polkeng2

should I use state with tRPC

Hi, this may be a dumb question, but I can't seem to find a proper answer on Google. I am creating a simple t3 app that stores values in a database and then displays them on a grid. I am using tRPC, using a useState to store the data, and modifying the state on mutation success for example. Is this how I am supposed to do it or is there a way to do it without the useState, using directly the tRPC data and refetching on mutation?
Was this page helpful?