polkeng2
polkeng2
TTCTheo's Typesafe Cult
Created by polkeng2 on 6/1/2023 in #questions
nextjs13 do get request with searchbar
Hi, I am currently building a nextjs 13 project, trying to get in touch with the app router and server components. I currently have a searchbar, which is a client component, and I want it to do a get request from an api with the input from the searchbar. Should that request be done in a client component with something like react-query or is there some work around to be able to fetch inside a server component?
16 replies
TTCTheo's Typesafe Cult
Created by polkeng2 on 2/10/2023 in #questions
react-table v7 globalFilters not working
I am writing a CRUD app with the t3 stack and react-table that basically fetches the data with tRPC and displays it in a table. However, I am having some trouble adding a globalFilter, because whenever I try to get the globalFilter and setGlobalFilter from state, it says they do not exist in tableInstance and tableState. Does anyone have any insight?
1 replies
TTCTheo's Typesafe Cult
Created by polkeng2 on 12/22/2022 in #questions
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?
5 replies