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

Migrating react-query v3 to tanstack-query v4

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

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

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....

Why does the modal not close after navigating to home page?

See codesandbox why does the modal component stays mounted after navigating back to the "home" page, where the modal RSC is only returining null?...

NextJs not picking up my ENV vars - no changes made

Very strange - haven't touched this part of the code, or done any new npm installs or anything... but after restarting my workstation, im getting the Invalid Env Vars error... I've just added an var called ENV_FILENAME (with the file name of the ENV File it's in) to all the env's on my system and added ```mjs...

How to set up Clerk with tRPC in app router?

Hi! I'm having trouble setting up Clerk in the t3 boilerplate using app router. I am quite confused it's the first time I'm trying the new architecture, I am doing this as an exercize and I am trying to understand how things are organized. I think I should be editting the files: - src/server/api/trpc (this is where the createTRPCCOntext is defined, so I guess I should add the auth object here): ...

Personal Project - What Language

I am trying to learn things and I like doing projects to learn instead of following a course each time. But let’s get to the point. I want to make a app / GUI which has a collection of macro’s that being for games (where it’s allowed) or day to day use. I would prefer something not too heavy on resources, and something precise in timings etc. And if possible (I like modern / Fluent design) something which has that capability. I’ve read into XAML and C# but where do I start? WPF, WinUi3, Avalonia, the Uno?...

Missing FormData value when using Server actions

https://paste.ofcode.org/x5JEX8LRy5F6gLxqvNCBqp -> Form Component https://paste.ofcode.org/3bRDCsJTcq9En6Ltf5EXg2j -> Country Combobox I am currently facing an issue where an input value ie. the country ID is not being sent as part of the FormData object to my server action anyone able to advise on what may be wrong ...

Theo's tutorial

Following Theo's tutorial reaching the upload thing part. Adding Theo's code to mine and everything going bat-shit-crazy Picture is just a small fraction of hundreds of random errors appearing out of nowhere 😦...
No description

Website hosting with HIPAA compliance

Hey guys, I was recently hired at a health tech startup and I'm wondering if anyone has any experience with setting up a website and choosing a tech stack that will be HIPAA (Health Insurance Portability and Accountability Act) compliant? I know the subject can get extremely complex, but I'm wondering if anyone could provide any insight. Thanks a bunch.

onUploadError

When I upload a wrong file type intentionally I get this error (image). I wanted to display in the UI that the user is trying to upload an invalid file type.
No description

ERROR: UPLOADTHING No slug provided in params: {}

Hello guys, I am working on an web app that integrates an image uploader, so I stumbled upon uploadthing, and implemented it with a Dragger UI from ANTD Design ("antd": "^5.16.4"), but when upload image event happens the uploadthing returns error
⨯ UPLOADTHING 13:03:16 No slug provided in params: {}
⨯ UPLOADTHING 13:03:16 No slug provided in params: {}
From the docs I was unable to solve this, so maybe someone else can help me with some information....

How do i debug my expo app

I am seeing the trpc queries etc going to the backend but i want the logs for whatever is happening in my expo app. How do i get those?
No description

Combine with react-native app

Hi guys! I am working with a team who has already built a t3 stack web app. I have been brought in to support with the development of a mobile app using react-native. The stack utilises a postgresql database and next-auth. The app is deployed over multiple instances with an individual instance for each institution using the app I am reluctant to use t3 turbo at this stage as the current web app is complex and moving it across will be a significant task. Has anyone got experience or advice for linking a new react native app to an existing build? I am unsure whether to set up a standard next-js / express backend to handle api calls or whether there is a clever solution with a different package?...

Array.pop() cant be undefined after if check, but typescript doenst know.

Hi, i have this snipped in my code: ```ts if (x.length > 1) { let entry = x.pop(); this.setSelected(0);...
Solution:
as Entry does the job

nextjs cache questions with new react news

with the new react fetch stuff, if I want to use NextJS unstable_cache, do I need to also wrap a React.cache over it?

change typescript version in workspace to have typesafety for nextjs (const dynamic =)

how can I change the typescript version in my workspace to have typesafety for nextjs (const dynamic =)? I tried searching change ts version but use the workspace option doesn't exist. Do i need to be in a ts file?...
Solution:
The TypeScript version used by your workspace is the version installed in your current project’s node_modules directory, which is specified under devDependencies or dependencies in your package.json file.

Is there T3-stack alternative that doesn't use Next.js?

I like the idea, but not Next.js. Can't it be replaced?

T3 - pass current tenant slug into TRPC context

I'm trying to create a Saas product with T3 and I need to have the tenant slug in the TRPC context so that I can try to do the operations in the correct tenant. I was able to use headers from the react client to pass in the slug, but I don't know a good way to solve this for server components. Does anyone have a good example or can provide some guidance for this?...

Dockerizing t3 app with mysql database

Hello, im struggling with dockerizing my t3 app and.. idk how to handle that correctly :/ Ive read article on t3 website but i cannot handle running my database/app simultanously, im getting error like that on screen. My first touches with docker, do you have any idea what will be wrong? 🤔 ...
No description