Jacob
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Mugetsu on 9/3/2024 in #questions
Use Zod schema after parse & transform as a new schema
Note: When using the
.extend
method even if you remove the field on the clientSchema
it will still be there on the serverSchema
7 replies
TTCTheo's Typesafe Cult
•Created by Mugetsu on 9/3/2024 in #questions
Use Zod schema after parse & transform as a new schema
@Mugetsu
So what i would recommend is the following:
What you could also do, is lets say we have many client fields that aren't all needed on the server e.g:
Or instead of omitting the value you could use the
.pick
method:
7 replies
CDCloudflare Developers
•Created by Jacob on 9/9/2024 in #pages-help
Configuring a monorepo
Forgot to remove the
wrangler.toml
from the .gitignore and decided to opt into using the Root Directory
setting2 replies
CDCloudflare Developers
•Created by Jacob on 9/4/2024 in #d1-database
Hi, I am having troubble setting up
Figured out i was running the incorrect command was running
drizzle-kit migrate
rather than drizzle-kit generate
2 replies
TTCTheo's Typesafe Cult
•Created by Wezter on 8/31/2024 in #questions
Developing for multiple platforms.
If i were to be building a app with web + mobile i would be using something like react and react native with something like expo. i has seen teams use react native as a standised apporach to building web apps and just change the complier to use their custom components so for example a
View
might be a customised div element.
I can't find the video but this is something that Twitter (X) did for their webapp for mobile devices.
Expo has released support for building out web apps (https://docs.expo.dev/workflow/web/).
I think the biggest benift to building the web app with react and a frame work than using something like react-native is that is essentally the same logic just changed so you can share code, functions and much more between the platforms in a mono repo3 replies
TTCTheo's Typesafe Cult
•Created by Ankan on 9/1/2024 in #questions
need help in css
To build responsive websites i would recommend using an abstraction on css like tailwind to speed up the process and keep things nice and clean: https://tailwindcss.com/
If you want to use normal css than i would recommend doing something like this:
Alternatively you could use instead for element you know you want a certain size of the page to use percentages or calculated values based off the screen size e.g
width: 50%
or width: calc(100% - 30px);
3 replies
TTCTheo's Typesafe Cult
•Created by Mugetsu on 9/3/2024 in #questions
Use Zod schema after parse & transform as a new schema
So just going to add a clarifying question, you are using the schema:
for the client side form validation? and for example you would want the tRPC validation schema to look something like this?:
Is that correct or do i have it wrong?
7 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 9/4/2024 in #questions
Failing to connect to local d1 db with drizzle
3 replies
CDCloudflare Developers
•Created by Jacob on 8/4/2024 in #pages-help
Bun failing builds
never mind i got it all working again had to add the
bun.lockb
back so it would download the pckages7 replies
CDCloudflare Developers
•Created by Jacob on 8/4/2024 in #pages-help
Bun failing builds
It is now saying that astro command is not found
7 replies
CDCloudflare Developers
•Created by Jacob on 8/4/2024 in #pages-help
Bun failing builds
Yeh that seemed to stop it failing the download thank you
7 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 10/24/2023 in #questions
Struggling to use VERCEL_URL with `@t3-oss/env-nextjs`
Turns out the solution is to change the turbo config to include the envs
4 replies
TTCTheo's Typesafe Cult
•Created by Steven-sensei on 6/27/2024 in #questions
Shadcn Dialog + Form Error: React.Children.only
That's alright i have had the same issue before, and a bit confusing if you have fixed it else where by accident
5 replies
TTCTheo's Typesafe Cult
•Created by A Reptilian on 6/27/2024 in #questions
Most efficient monolith structure to have an Express.js REST API with Next.js SSR client?
Going off waht @Ovidius said you could run in a monrepo, turbo is the best choice for nextjs https://turbo.build/repo then you have all the code in the same code base and simply import the package in your nextjs repo if you want to for example share types.
example mono repos:
- https://github.com/midday-ai/midday
- https://github.com/projectx-codehagen/Badget
- https://github.com/Codehagen/Dingify
- https://github.com/vercel/turbo/tree/main/examples
4 replies
TTCTheo's Typesafe Cult
•Created by Steven-sensei on 6/27/2024 in #questions
Shadcn Dialog + Form Error: React.Children.only
Formcontrol only expects 1 react element.
Change your structure to something like this:
if you wanted to have what you already have just wrap it in a framgment:
Generally you can fix the error
React.Children.only expected to receive a single React element child.
by wrapping your items in a fragment (which adds no extra markup) or your could wrap in a simple div
5 replies
TTCTheo's Typesafe Cult
•Created by Huperniketes on 6/13/2024 in #questions
How do I map next.config.js code samples in the Next docs to T3's implementation?
Yeh defintly not the prettiest solution
7 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 6/25/2024 in #questions
Connecting to websockets in app router
Yeh Cool thank you for your help
5 replies