! AlexNotTheLion
! AlexNotTheLion
Explore posts from servers
TTCTheo's Typesafe Cult
Created by ! AlexNotTheLion on 6/24/2024 in #questions
conditional rendering with url search params and server side data fetching with nextjs 14
I have a modal which is shown based on url params "?modal=friends", I would like to use as much server side data fetching as possible as it makes a nicer user experience, the modal should fetch the users friend list from supabase and then conditionally render either a dialog for desktop or a drawer for mobile (both shadcn components), ideally id like to avoid waterfalling components. so far I've tried. 1. parallel routes (completely broken and don't hot reload on changes, i had to completely restart the dev server to see changes) 2. doing client side data fetching which is slow and only fetches on render, i would like to fetch the data before the dialog / drawer is mounted the questions i have are: 1. is there a way around this without having a really gross waterfall architecture 2. are parallel routes just completely the wrong thing here as i dont actually have routes to navigate to 3. am i just being a moron and theres something completely different i should be doing instead
1 replies
TTCTheo's Typesafe Cult
Created by ! AlexNotTheLion on 6/21/2024 in #questions
In Nextjs how do you set serachParams in middleware ?
No description
17 replies
TTCTheo's Typesafe Cult
Created by ! AlexNotTheLion on 3/20/2024 in #questions
NextAuth.js (Auth.js) vs SuapbaseAuth
Working on a side / portfolio project and I was using Planetscale until they nuked their free tier so i moved to supabase (which i really like so far, no need to spin up drizzle kit studio to edit tables). I was also using Clerk but ran quickly into an issue where i wanted to include all the users related to a query and couldn't easily get user data without having to do multiple queries, one solution would be to use webhooks to "sync" data between supabase and clerk. This led me to supabase auth, useful user management interface, also automatically syncs with a users/profile table if I want thanks to database functions, good cascading options, and also allowed me to use more providers than clerks default 3 (for the free tier at least), after poking around and doing some googling I noticed lots of people recommended next auth / auth.js over supabase auth, however most of the results I found are at least a year old or more and it appears supabase has changed a lot since then. So what are the arguments for NextAuth.js (Auth.js) vs Supabase Auth as of March of 2024 ?
9 replies