batata
TTCTheo's Typesafe Cult
•Created by batata on 10/2/2023 in #questions
HTTP requests in next 13
I sending http requests in a server component and i want to inspect these requests, but they arent showing up in network tab in the browser nor in the terminal. How do i inspect them?
2 replies
TTCTheo's Typesafe Cult
•Created by batata on 9/28/2023 in #questions
Filtering and search in RSC
I'm trying to implement filtering and searching in server components but its kinda slow, the way im doing it is i redirect to a new url with searchParams and then filter the data in the page.tsx which is a server component,
Here's the code:
thats from the child client component
and this is the page.tsx
is there another way to do it? maybe my internet is slow so its taking couple of seconds to go to the new url
1 replies
TTCTheo's Typesafe Cult
•Created by batata on 7/8/2023 in #questions
Fetching only once
so i have an authToken being stored in the local storage and i want to send it in a POST request each time the user opens the site to check if its still valid, but how do i make the POST request only fire once when the website first loads, that way i know if the user is authenticated or not and dont have to fetch it again while they are using the app. Im using next 13 with the app dir
4 replies
TTCTheo's Typesafe Cult
•Created by batata on 2/11/2023 in #questions
Deployment on AWS
Hello, I want to deploy my t3 app with a postgres db on aws using the free tier. Is dockerizing the project and using ECS the easiest option?
9 replies
TTCTheo's Typesafe Cult
•Created by batata on 2/4/2023 in #questions
tRPC in getServerSideProps
this is the code im writing in the getServerSideProps
javascript
getting this error "TypeError: Cannot read properties of null (reading 'useContext')"
I enabled ssr in the utils/trpc.ts file, still same error
9 replies
TTCTheo's Typesafe Cult
•Created by batata on 2/3/2023 in #questions
trpc useQuery fetch on demand
javascript
so in this code the useQuery is firing everytime query changes, i dont want that, i just want to fetch the data in the getdata function. Is there a way to do it?
3 replies
TTCTheo's Typesafe Cult
•Created by batata on 1/22/2023 in #questions
Wait for useQuery result
so im checking on load if the current shop is a favourite shop or not, but the favShop is undefined at load then you get the result, since i cant use async await on it, how do i wait for the result so i can use it in the useState
19 replies