oljimenez
Explore posts from serversDTDrizzle Team
•Created by oljimenez on 8/31/2024 in #help
Drizzle ORM migrations on rename fields?
Hi, guys, in my company we want to use Drizzle ORM with Payload CMS, but we're searching for how Drizzle handle migrations.
I know that Drizzle will generate automatic migrations using
pnpm drizzle-kit generate
, but i've never tested with rename fields? How Drizzle will behave on those situations?
We're looking for automatic detecting of rename fields, similar how Django does. Will Drizzle be capable to detect rename fields?
Currently we're using MongoDB and any dev could rename fields and break the UI (not the DB), we're searching for a way to avoid that by using SQL or any alternative.
Any recomendations on the subject?2 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 4/5/2024 in #questions
Downsides of using AsyncLocalStorage on Server Components?
Hi guys, i just wana know if there's any downsides of using Aysnc Local Storage from Node.js in Server Components?
I've an example App that show how it will work. https://stackblitz.com/edit/stackblitz-starters-9a4rak
My use case is the following. I've an app that make many fetch call to the API to get data, the majority of those fetch calls need the page params. Currently the only way to get params in a RSC is layout.tsx or page.tsx props, and then you need to pass those values as props.
So, the question using this approach have any downsides? Is this even recommended?
2 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 3/27/2024 in #questions
React, SASS, tsup and not loading component styles
Hi guys, anyone with experience using tsup and scss?
I have a work React library codebase that use SASS for styling and tsup for bundling. But i noticed that importing a component don't load his styles, so i have to import a 'global.scss' file to make it work.
I would like that when importing a component all its styles are imported automatically.
I've been debbuging the output bundle and seems like tsup (esbuild) remove the css import from the file, so it make sense why is not working.
Anyone know how to fix this issues? Btw, i'm also migrate them to SCSS modules.
1 replies
CDCloudflare Developers
•Created by oljimenez on 3/15/2024 in #pages-help
Cloudflare Next-On-Pages crash on Docker
1 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 1/30/2024 in #questions
The HTML Dialog Element vs Headless Component Libraries Dialog
Hi guys, i wanna learn why Headless component libraries like Ark UI/Radix Ui/etc,etc for a Dialog component don´t use the HTML dialog element. What´s the reason? It´s not better for SEO having native and progresive enchanment dialgos/modal/drawers?
6 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 1/29/2024 in #questions
When is safe for using a CSS property?
Hi guys, i'm building a app of work with SASS and i have a use case for the new :has() CSS property. How safe is to use it? When is safe to use it? Is there any downsides of using it right now?
4 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 1/22/2024 in #questions
Simplify Next.js log error messages.
2 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 1/13/2024 in #questions
Nextjs SEO and Google Rank advice...
Hi guys, so I'm trying to learn how the Google Rank work.
I'm working on a big ecommerce site, and we're moving some pages to Nextjs because better SEO and speed with SSR and RSC.
The point it's that i hear some people saying that having good SEO it's only needed for the landing page, while i been reading others that said that all public pages, at least the most used, need to have a good SEO because that impact on your website Google Rank.
What do you guys think? Anyone work on a big projects that need SEO for organic traffic or know well this topic, that can answer me this question.
Some resources to learn about this? I'm trying to have arguments to present it to my boss.
Thanks.
35 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 12/15/2023 in #questions
Import components from outside of Nextjs app.
Hi everyone, i have a Nextjs app, but i need to import components from outside of the Nextjs folder. In the picture i show you a nextjs folder and a webpack folder where lives the components i wanna import.
Right know i configure my nextjs tsconfig and add this
in the 'paths'
"@/webpack/*": ["../webpack/assets/js/components/*"],
and this in the
'include'
"../webpack/assets/js/components/*"
Then i tried to make an import like this
import { SearchBar } from '@/webpack/search_bar';
or like this
const SearchBar = dynamic(
() => import('@/webpack/search_bar').then((component) => component.SearchBar),
{ ssr: false },
);
Nothing is working, at least with my tsconfig Typescript it stop yelling me, but it give me this error at runtime.
Module not found: Can't resolve '@/webpack/search_bar'
Anyone know how to fix this?6 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 8/17/2023 in #questions
Array<string> vs Record<key, true>?
14 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 7/21/2023 in #questions
Ecommerce dummy question: Product Cart Stock Managment?
Hi, I'm doing an ecommerce and I need to make a decision about whether add/remove a product in the cart should update the stock in the inventory of that product or not. I'm waiting some ecommerce god help me with this decision. I search in google and forums but i found both answers so i´m confused.
2 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 7/21/2023 in #questions
Ecommerce dummy question:
Hi, I'm doing an ecommerce using t3 stack and I need to make a decision about whether adding a product to the cart should reduce the stock in the inventory or not. Currently I do reduce the amount of inventory stock by adding a product and with a cron job setting a time limit for that cart. But I know that there are arguments against this so I would like to have more opinions to see.
2 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 3/31/2023 in #questions
TailwindCSS and CVA autocomplete
Hi guys, i'm using CVA with TailwindCSS for building complex state components, but a particular thing bothers me, is that there is not autocomplete of TailwindCSS clases in CVA. I'm new to Tailwind (i don't like it, but is fine to use it), so maybe some of you guys know a trick for this?
17 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 2/25/2023 in #questions
Zod File Upload Validation with Open-Api Support?
Hi guys, anyone know how to validate file upload with zod and get also open-api support?
1 replies
TTCTheo's Typesafe Cult
•Created by oljimenez on 2/25/2023 in #questions
Zod File Upload Validation with Open-Api Support?
Hi guys, anyone know how to validate file upload with zod and get also open-api support?
1 replies