jack
Explore posts from serversTTCTheo's Typesafe Cult
•Created by jack on 3/17/2024 in #questions
revalidate cached data on page load app router?
This is actually also happening to me when i don't use unstable_cache
3 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
It’s been long enough that I can’t remember why I gave up on remix
13 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
I’m back to considering moving to remix for the 3rd time
13 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
Yea Idc about this question anymore lol
13 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
I need to take another look soon
13 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
I didn’t sadly I just gave up
13 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/12/2023 in #questions
type wizard help needed for my fake trpc package
chatgpt gave me a working solution that creates some sort of
UnpackPromise
type and then casts with as
. Not sure if this is optimal though, definitely looking for feedback3 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
i should state i am using app router
13 replies
TTCTheo's Typesafe Cult
•Created by RonakMehta on 11/10/2023 in #questions
How do I make a web component that can hold any HTML and keep it to itself with Shadow DOM?
I don’t understand the question? It seems like the answer is just “make a web component”
3 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
Think about a page with a sidebar, header, sub header, all in different level layouts that need user data
200 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
The user example is a very common one yea
200 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
To put it simply, other frameworks have support for this feature (passing data from layouts down). Next explicitly mentions that they don’t support this, and explains their own solution. If this wasn’t a common, or at the very least not uncommon, pattern, then why is every major meta framework accounting for it?
200 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
The biggest culprit is that, unlike other frameworks like SvelteKit and iirc Remix, you can’t pass data from layouts downwards as a feature of the framework. Next/Vercel recommends just refetching because it’s de-duped
200 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
This is exactly the pattern that causes this issue
200 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
A layout that shows a users profile picture and username, and the page shows other data that depends on user data for example
200 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
I was thinking of just defining an object that looks like a tRPC router. Write some sort of thin wrappers that make mutations server actions, and queries just regular functions lol
200 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/8/2023 in #questions
including /edit path for profile data?
Getting some weird fetch behavior though
7 replies
TTCTheo's Typesafe Cult
•Created by jack on 11/8/2023 in #questions
including /edit path for profile data?
I’ve implemented it with search params and I really like it
7 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
It just feels largely counterproductive for me to bother with /pages right now, knowing my curiosity I’ll wanna rebuild in app router as soon as I ship. But the app router experience is frustrating so we’re just in an unfortunate grey area right now
200 replies
TTCTheo's Typesafe Cult
•Created by shikishikichangchang on 11/7/2023 in #questions
how to revalidate data?
I largely agree with you on the “it’s bleeding edge, expect shit to not be nice”
200 replies