MALEV0L3NT
MALEV0L3NT
Explore posts from servers
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 4/30/2024 in #questions
Next.js app router with dynamic routes and trpc weird behaviour
It would make sense that TypeScript thinks it's a number in the editor but at runtime it actually is not a number and therefore is incorrectly typed at runtime... That's probably what's happening
5 replies
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 4/30/2024 in #questions
Next.js app router with dynamic routes and trpc weird behaviour
Oh unless TypeScript is just lying to me
5 replies
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 4/30/2024 in #questions
Next.js app router with dynamic routes and trpc weird behaviour
Shit I don't think the screenshots ever uploaded... In the first code block the id in the url parameter is being typed as a number, and typescript interprets it as a number in const { id } = params. As far as I can see, TypeScript is interpreting it as a number, but Zod for some reason seems to think otherwise
5 replies
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 10/8/2023 in #questions
React-toastify display toast from Next.js api route
How would that webhook idea work?
9 replies
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 10/8/2023 in #questions
React-toastify display toast from Next.js api route
I eventually realised that I was asking the completely wrong question here....
9 replies
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 10/8/2023 in #questions
React-toastify display toast from Next.js api route
I don't think this will work as AWS Lambda is calling the api route, not the frontend. The api route and frontend are completely disconnected here
9 replies
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 10/8/2023 in #questions
React-toastify display toast from Next.js api route
Is there maybe a way I can set some state in the api route and have the frontend listening for when that state changes? I'm not sure if anything like this exists but it's really the only thing I can think of
9 replies
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 7/10/2023 in #questions
QStash vs Custom Solution?
Ok got it, thanks for the advice 🙂
6 replies
TTCTheo's Typesafe Cult
Created by MALEV0L3NT on 7/10/2023 in #questions
QStash vs Custom Solution?
Bumping this.. Any ideas if this would work?
6 replies