低级黑小明👑
低级黑小明👑
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/29/2023 in #questions
"it works on my machine" deployed app to vercel and it blew up
11 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/24/2023 in #questions
how to upgrade t3 webpack to turbo pack
does it take a lot of work to do it? I've built my app in t3 and has made a lot of progress, I'm still kinda new to this so Idk if it's complicated to do this
2 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/13/2023 in #questions
variable initialized useState as true but the state is false
hasReaction is true, but liked is false error gets printed multiple times const hasReaction = postWithUser.reactions.some( (reaction) => reaction.userId === user?.id ?? "" );
const [liked, setLiked] = useState(hasReaction);
if(hasReaction !== liked) { console.log('error'); } I'm calling this in side each tweet component Is this common and is it supposed to happen? maybe it has sth to do with life cycles?
5 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/10/2023 in #questions
Is there a specific way to integrate react router in t3?
this may seem trivial but I've had lots of trouble with it. When I put router(browserRouter) tag around the <component> tag in _app.tsx I always get document is not defined error. I've tried other places and I get the same error, so I wonder if there's another way to use react router in t3(nextjs) because I've not seen anybody else having this trouble. my app is only half built but it seems like a lot of work to migrate to app router. import { Link, Navigate, Routes, Route, BrowserRouter as Router} from "react-router-dom"; <Router> <Routes> <Route path='/admin' element={<AdminPage />} /> <Route path='/' element={<Component {...pageProps} />} /> </Routes> </Router>
18 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/3/2023 in #questions
Should I use Tanstack router
I'm kinda new to all this, I'm at an early stage of building a website, I saw theo talking about tanstack router. While it's still in beta, I'm not sure if I should use it. Also, I have no idea why the default routing is not good enough or how this lib improves over the others. Should I just use react router to navigate between pages?
9 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 4/27/2023 in #questions
how to properly handle passing trpc results as parameters?
44 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 4/24/2023 in #questions
How to redirect using trpc nextjs base on db query?
9 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 4/20/2023 in #questions
can't get query strings from context param
20 replies