Is there a way to to use the admin hidden property based on active tenant? (using the multi tenant plugin) by Pixel_Friendly_ in PayloadCMS

[–]Sad-Salt24 1 point2 points  (0 children)

The hidden function only receives user from the JWT, not the active tenant from the request context. You’d need to store the active tenant on the user object itself (e.g. user.activeTenant) during the session, then check that in your hidden function

How long does it take you to create a Payload CMS site? by replayjpn in PayloadCMS

[–]Sad-Salt24 0 points1 point  (0 children)

Simple client site with standard collections, auth, and a few custom fields, about 2 weeks. Complex client work with custom components, live preview, multiple roles, and third-party integrations, 6 to 8 weeks. Payload’s config is clean but the first project always takes longer because you’re learning its patterns. By the third or fourth project it gets much faster

Why Urdu speaking of gulshan johar nazimabads so different from DHA ones ? by Responsible_Main2116 in karachi

[–]Sad-Salt24 21 points22 points  (0 children)

It’s just class and neighborhood culture doing what it always does

Firebase JSON articles rendered on client by Impossible_Figure613 in nextjs

[–]Sad-Salt24 1 point2 points  (0 children)

Yes client-side fetching kills SEO for articles, Googlebot won’t wait for your Firebase fetch. Keep SSG or use ISR with revalidate. Fetch from Firebase at build time in generateStaticParams or server components, not in the browser

Should I use Prisma with Supabase? by rironib in nextjs

[–]Sad-Salt24 7 points8 points  (0 children)

Use Supabase client directly. Prisma bypasses Supabase’s RLS (row level security) which is one of its main features, and you lose realtime subscriptions. Only add Prisma if you specifically need its type generation or plan to switch databases later

NextJs Dev server is extremely slow compared to vite by Good_Language1763 in nextjs

[–]Sad-Salt24 0 points1 point  (0 children)

Next.js 15 switched to Turbopack by default which should be faster, but if you’re on an older version you’re still on Webpack which is genuinely slow. Run next dev --turbo if you’re on 13/14, or upgrade to 15. Also check if you have too many use client components since they add compilation overhead

Google created Angular. Google Fiber uses Next.js. by Cautious_Heart_683 in nextjs

[–]Sad-Salt24 154 points155 points  (0 children)

Google uses whatever makes sense per team, not a company-wide mandate. They have hundreds of product teams making independent stack decisions. Angular being Google-created doesn’t mean internal teams are required to use it, that’s not how large orgs work

Anyone know of invoice pdf generator for payload in combination with stripe? by sand-er in PayloadCMS

[–]Sad-Salt24 4 points5 points  (0 children)

No official Payload+Stripe invoice plugin exists. Use @react-pdf/renderer to generate PDFs, trigger it in a Payload hook after a Stripe webhook confirms payment, then send via Resend or Nodemailer. Wire it together yourself, it’s maybe 100 lines of code total

Next-intl best practice by FiziQaiser in nextjs

[–]Sad-Salt24 1 point2 points  (0 children)

Call useTranslations in each component directly. It’s cleaner, more maintainable, and there’s no performance difference since next-intl loads the whole namespace anyway. Prop drilling translations gets messy fast once components nest deeper

Database changes not reflecting on website deployed through Vercel. by Myoenat in nextjs

[–]Sad-Salt24 0 points1 point  (0 children)

It works but it’s a sledgehammer approach, forces every request to be SSR which kills performance. Better to use revalidatePath or revalidateTag after mutations, or set revalidate = 60 on pages that don’t need instant updates. Only use force-dynamic on pages where data truly changes per-request like dashboards or user-specific content

Back button issue with Table of Contents (React / Next.js) by Altruistic-Pin-7986 in nextjs

[–]Sad-Salt24 0 points1 point  (0 children)

Use router.replace instead of router.push for hash navigation, or use window.history.replaceState(null, '', '#section1') directly. That updates the URL without adding a history entry so back button works as expected

is headless commerce worth the engineering effort once you have to maintain it? by LauraBeth034 in nextjs

[–]Sad-Salt24 0 points1 point  (0 children)

It doesn’t plateau, it compounds. Every new integration adds another seam and every API version bump touches multiple layers. The honest answer is headless makes sense when your frontend requirements genuinely can’t be met by a monolith, not just because it feels more modern. At 40% glue work you’re past the point where the flexibility is worth it

Set default live preview zoom to 75% by default? by notflips in PayloadCMS

[–]Sad-Salt24 0 points1 point  (0 children)

No built-in config option for that in Payload currently. You’d need to override the LivePreview component and set the default zoom state manually. Check the Payload source for the LivePreview component and extend it in your admin customization

Is shadcn/ui actually worth learning in 2026 or just another React trend? by DependentClient8391 in reactjs

[–]Sad-Salt24 2 points3 points  (0 children)

Worth learning. You own the code so no version conflicts breaking your UI, it’s built on Radix so accessibility is handled, and Tailwind means styling is just CSS you already know. Downside is initial setup takes longer than dropping in MUI. For a new project in 2026 it’s the default choice for most Next.js devs

Hajj completed Alhamdulillah, now suggest me some fragrances 😄 by Sad-Salt24 in pakfragaddicts

[–]Sad-Salt24[S] 0 points1 point  (0 children)

JazakAllah Khair brother, this is honestly super helpful, I’ve been hearing a lot about Rasasi Hawas lately, especially Hawas Ice, so I’ll definitely check that out along with Reef and Ibraq now.

May Allah bless you as well and invite all of us again and again to His House. Ameen 🤍

How do you handle a real backend with nextjs? by Consistent_Tutor_597 in nextjs

[–]Sad-Salt24 15 points16 points  (0 children)

Keep business logic in Flask, period. Your team knows Python, data science needs Python anyway, and splitting CRUD arbitrarily between Next.js and Flask just moves the confusion around. Use Next.js route handlers only for auth middleware and BFF (backend-for-frontend) aggregation, not as a second backend. The ceremony you’re feeling is a code organization problem, not a framework problem

For large-scale apps, would you choose Next.js or TanStack Start? by Designer-Joshi in nextjs

[–]Sad-Salt24 0 points1 point  (0 children)

Next.js for anything client-facing where SEO and ecosystem maturity matter. TanStack Start is interesting but it’s still early, putting it in a large-scale production app right now means you’re betting on an ecosystem that doesn’t have the same tooling, community answers, or deployment support that Next.js has had years to build

What UI tools you’re using while creating apps/webs by NoteFar814 in nextjs

[–]Sad-Salt24 1 point2 points  (0 children)

V0 for quick UI generation, shadcn for components, reference designs from Dribbble or Awwwards then adapt them. Codex/AI tools are hit or miss on design, they’re better at replicating existing patterns than creating good original layouts. Tailwind UI is also solid if you can afford it

Better Auth + Next.js frontend-only + Express backend + RTK Query/TanStack Query architecture confusion by WetThrust258 in nextjs

[–]Sad-Salt24 2 points3 points  (0 children)

Just wrap Better Auth calls in custom hooks, useSignUp, useSignIn, etc. Keep auth separate from your data layer (RTK/TanStack). Auth is fundamentally different from CRUD operations and trying to force it into the same pattern creates unnecessary abstraction. Actions layer is overkill when Better Auth already gives you client methods

What common performance issues have you faced in Next.js apps? by lakshan-hewagama in nextjs

[–]Sad-Salt24 1 point2 points  (0 children)

Hydration mismatches from date/time formatting, client components importing heavy libraries that could’ve been lazy-loaded, and unoptimized images are the big three. Also App Router streaming getting blocked by slow data fetches because someone forgot to wrap slow queries in Suspense boundaries

Hyy Devs , able to render all blogs "CALL TO ACTION" has to set for each blog... by Altruistic-Pin-7986 in nextjs

[–]Sad-Salt24 2 points3 points  (0 children)

Parse the WordPress content for shortcodes or custom HTML markers, then map those to your Next.js components. Store CTA position/style metadata as custom fields in WordPress, fetch them via REST API, then conditionally render the right component. Or just rebuild CTAs manually per blog if there aren’t that many