Theo's Typesafe Cult

TTC

Theo's Typesafe Cult

Join the community to ask questions about Theo's Typesafe Cult and get answers from other members.

Join
Max
Max5/12/2024

pnpm - ERR-INVALID-THIS

Recently tried to convert my plain t3 app, into using turbo repo. Now when i try get it to deploy to vercel it screams red at me. Anyone have any ideas?...
Solution:
I found the issue, i had my pnpm package lock from the original repo still in there. If you encounter this issue, remove all package locks. And reinstall packages. Then commit back to git....
No description
WellDon
WellDon5/12/2024

Have you tried mentorship

Hey everyone, I'm an in pass of becoming senior Web Developer but like every x-month I'm not feeling competent enough. Hi impostor syndrome πŸ‘‹ . In order to compensate that I wanted to follow CS50, work a lot on my design pattern but as well probably going for a mentorship. My question would be : Have you ever used some? What is your take on it? Which website would you recommend?...
FleetAdmiralJakob πŸ—• πŸ—— πŸ—™
FleetAdmiralJakob πŸ—• πŸ—— πŸ—™5/12/2024

end to end encryption

Hi, I currently want to build a chat app with basic end to end encryption. Could someone show me a little bit how this should work? Like how do both participants in a chat know with what to decrypt the messages?...
Solution:
Both chat clients must generate a key pair, then send their public keys to one another. Before sending the message you encrypt it with the public key you got from them. When you receive the message you decrypt it with your private key.
dollahane23033
dollahane230335/11/2024

weird query behaviour

I’ve solved this issue but I’d love some insight into why I ran into it. Two screenshots show queries on an adId column with the where clause not returning the correct number of rows, I then changed the query to another column to then filter the rows I don’t require which gave me the correct result. I’m using NEON db with Tanstack query and Next JS.
No description
Swamp 2077
Swamp 20775/11/2024

The latest T3 stack tutorial bug

After finishing the tutorial I have noticed that there is a bug where: - I open the page and log-in. I am in the "/" route now. - I open any of the images I have uploaded. - I delete the opened image, which redirects me back to the "/" route. - Now when I click on any image to open it, it doesn't open. The route changes, so if I refresh the page, I can view the clicked image, but trying to open it after deleting an image doesn't open the modal....
FleetAdmiralJakob πŸ—• πŸ—— πŸ—™
FleetAdmiralJakob πŸ—• πŸ—— πŸ—™5/10/2024

Next.js API Routes behaving differently on Vercel

I have this code and if I run it locally (dev and build) I can see the status text, but if I host it on Vercel I just get BAD REQUEST
No description
TangoJuliett
TangoJuliett5/10/2024

What year was Theo born?

I know this is an odd question but I need it for my PKM and my ADHD wont let me ignore this field. Thanks lol
notrebekahmikaelson
notrebekahmikaelson5/10/2024

@tanstack/react-virtual not displaying my virtual list

i have an announcement page where i am fetching all the announcements from the trpc's useInfiniteQuery hook and i am using @tanstack/react-virtual for rendering and refetching query i saw docs on trpc's use infinite query for implementing. link for the same - https://trpc.io/docs/v10/client/react/useInfiniteQuery ...
index
index5/10/2024

Next JS Double

If i use any dynamic element ( like cookies / headers ) in any component of my page , then the entire page will be shifted to dynamic rendering . Is this correct . Example : If i add Header component in the layout.tsx file which uses cookies then layout will be dynamic , including all other pages as well which have that layout ....
argcast
argcast5/10/2024

Next.js Script tag breaking my app

Working on a simple app to implement Office add-in via next-js. The thing is when I try to route between pages using the <Link> tag from Next.js, if there is a <Script> present it just breaks my app. Script tag is placed on app/layout.tsx: ```typescript import "~/styles/globals.css"; ...
FleetAdmiralJakob πŸ—• πŸ—— πŸ—™
FleetAdmiralJakob πŸ—• πŸ—— πŸ—™5/9/2024

What do you think about these videos

As I watch every video from Theo I'm confused about these two videos from DarkViper (I did not know this guy before watching these videos). What do you think about them? Seems like a profound critique. https://www.youtube.com/watch?v=m9fkdpmJD4o https://www.youtube.com/watch?v=s4BFIDYYYCA...
janglad
janglad5/9/2024

Next Image lazy loading w/ ShadCn/Embla carousel

Hey Has anyone set up a proper image carousel with Next image and the ShadCn or underlying Embla component before? I got everything working but the lazy loading isn't really behaving the way I'd like to. Only one image is visible at a time, but it loads the first 3 upon first render without interaction. This results in the carrousel not being interactive until those 3 images have loaded. How would you guys solve this?...
fotoflo
fotoflo5/9/2024

TRPC not returning immediately on error

Simple: ```ts export const sitemapRouter = router({ getSitemap: protectedProcedure...
Samyam
Samyam5/9/2024

Clerk

any ideas on how to add custom items in the dropdown menu
No description

TRPC deserialization cuts off long string to client

I got an oauth2 URL that’s very long because scopes are added as search params. The URL returned to the client is cut off completely. Not sure how to go about this. Is this related to superjson somehow?
blockeed
blockeed5/8/2024

Next Auth with Expo

Hey! I already have a NextJS app where I use Next auth as my authentication provider. I would like to build a mobile app with Expo that would use my NextJS API routes as well as the Rest API exposed by Next Auth. On the next auth website, they do not provide guidance / support Next Auth with React Native. However, I think there could be a workaround somehow. Has anybody done something similar to this in the past? Or if it's not possible, what would be your recommendation to go with if I want to use the same API for both the web and my mobile app. ...
D4rzk
D4rzk5/8/2024

Error - Something went wrong. Please contact UploadThing

I am making an app and I got a error: ``` [Error] Something went wrong. Please contact UploadThing and provide the following cause: – "RuntimeException: received a non PollingResponse from the polling endpoint" (anonymous function) (app-index.js:33) (anonymous function) (hydration-error-info.js:63)...
Knox
Knox5/8/2024

Migrating react-query v3 to tanstack-query v4

Im almost finishing this migration process ```js const getChanges = async (): Promise<Changeset | undefined> => { try {...
GabrielDSFS
GabrielDSFS5/8/2024

How to make a fully public page with TRPC requests on T3?

I need to make a public page on T3 that calls for some public data from TRPC but I see that if I make any TRPC calls (even a simple hello world procedure) it fails and the console gives me errors regarding Clerk. How can I have some fully public page/data?
No description
epsilon42
epsilon425/8/2024

Help me understand third party auth and storing user information

Do most apps that use third party auth still maintain their own Users table? I have very little experience on backend/auth so lack a fundamental understanding of how this works, but the basic examples I've followed using Clerk simply displays the currently logged in users name and email address which is stored in the JWT so I'm uncertain if I'm missing something where a Users table isn't actually required. Say for instance I have a blog with multiple authors/users and I wanted a page that displayed a list of all posts and the name of the user who posted it. To get the names of all the post authors, how would you do this? I'm guessing this means also maintaining a Users table which duplicates the user meta data any time a user signs up. This I guess would also give the flexibility of adding additional things like: username, date of birth, favourite Pokemon, etc....