低级黑小明👑
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/29/2023 in #questions
"it works on my machine" deployed app to vercel and it blew up
thx for the advice, I'll have a look
11 replies
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
I’m using t3, I don’t know what eslint is, but I’ll look into it
11 replies
TTCTheo's Typesafe Cult
•Created by Slamerz on 5/26/2023 in #questions
"createContext only works in Client Components." When I'm not using context.
good job. I wouldn't be able to figure this out. very impressive
16 replies
TTCTheo's Typesafe Cult
•Created by Slamerz on 5/26/2023 in #questions
"createContext only works in Client Components." When I'm not using context.
I know it's confusing, the clientside code is imported and run instantly. Just try adding 'use client' to places and see if anything changes, if you haven't tried AI, they can help more than you think to solve these problems.
16 replies
TTCTheo's Typesafe Cult
•Created by Slamerz on 5/26/2023 in #questions
"createContext only works in Client Components." When I'm not using context.
it's possible, it's just that the UI code will only run on the client instead of the server so it's important to know which piece of code is running server and which is running on client.
16 replies
TTCTheo's Typesafe Cult
•Created by Slamerz on 5/26/2023 in #questions
"createContext only works in Client Components." When I'm not using context.
Yeah that one got me early on. I found out the UI code will run on client side and server side, they run on server side first. Looks like you’re using nextjs 13.4, just use ‘use client’ at wherever you’re using the ui code should fix it, or use dynamic import and set ssr to false
16 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 5/13/2023 in #questions
variable initialized useState as true but the state is false
what I'd really like to know is if there's some kind of pitfall in this react system which caused this, because changing the code didn't solve the problem in call places
5 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 5/13/2023 in #questions
variable initialized useState as true but the state is false
thanks for the insight. I'm pretty sure that I didn't change the state anywhere, and the initial value shouldn't be changed. it seems like the .some statement has something to do with it. I changed it to const hasReaction = postWithUser.reactions.length > 0;
and it worked. Not sure why tho
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?
I think so, but I'm not going to find out anytime soon. I'll let others test it out then. I'm way behind my schedule
18 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 5/10/2023 in #questions
Is there a specific way to integrate react router in t3?
I'd love to move to app router, but I'm scared to move the _app.tsx page, not sure how to do it, I fear spending another day or two fixing building errors
18 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 5/10/2023 in #questions
Is there a specific way to integrate react router in t3?
I do need client side routing and navigation, the current routing seems lacking. I asked that question myself tho
18 replies
TTCTheo's Typesafe Cult
•Created by Muhammad on 4/30/2023 in #questions
Trying to make a website builder (a Wix clone)
I think you can build a simple version of it but not a clone, it's too much effort for one person. Essentially you're creating html and js code from drag&drop. There's much to search for since it's hardcore problem solving and programming.
a simple example:
you make an image drag and drop widget, when you drag it onto the body, it generates <img> tag with default attributes. then you'd need to either serlize the code or save it into the database.
if you're just building it for portfolio/study, I think you can build a simple working version. but if you're trying to build a product I strongly advise against it.
building this system requires lots of time just on design let alone implementation.
5 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 5/3/2023 in #questions
Should I use Tanstack router
thanks for the info. But when I use Broswer router I get document undefined error. I get window undefined error as well, some say it's because document is undefined on server side. Where in t3 app can I put the router definition?
9 replies
TTCTheo's Typesafe Cult
•Created by Thund3rd3v on 5/3/2023 in #questions
File Upload Supabase + T3 Stack
dude I linked the video tutorial for you
16 replies
TTCTheo's Typesafe Cult
•Created by Thund3rd3v on 5/3/2023 in #questions
File Upload Supabase + T3 Stack
you first need to choose a host to store your file, theo just launched a service you can try that out.
basically you only store url in your database, you upload the file to somewhere else. And the code is very different depending on what platform you choose.
if you choose supebase they have tutorials on their website and here: https://www.youtube.com/watch?v=JLaq0x9GbbY
16 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 4/27/2023 in #questions
how to properly handle passing trpc results as parameters?
you are absolutely right.
yes the naming wasn't corrret. I thought prisma and typescirpt would just return a post object with a user in it like traditional oop languages, but no, it's a post & user. It did cost problems down the line, I think I need to take a look in to the typescript type system
44 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 4/27/2023 in #questions
how to properly handle passing trpc results as parameters?
it does. I'm new to all of this so it seems weird to me
44 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 4/27/2023 in #questions
how to properly handle passing trpc results as parameters?
than you so much
44 replies
TTCTheo's Typesafe Cult
•Created by 低级黑小明👑 on 4/27/2023 in #questions
how to properly handle passing trpc results as parameters?
omg
44 replies