A Redditor inquired if the performance of their Next.js website, janitorialappointment.com, was subpar, sharing PageSpeed Insights scores of 75 for desktop and 60 for mobile [60↑]. The user later updated that they achieved 95 on performance after optimizations [23↑].
One user commented that the scores were average compared to other websites they've seen [28↑]. Another user suggested that the performance was indeed poor, advising to refer to the Lighthouse report for insights into the issues [23↑].
A commenter recommended ensuring the top slider images load eagerly to improve performance, providing a code snippet example [36↑].
A Redditor shared their frustration with PDF generation on Vercel [42↑], highlighting issues with using Puppeteer in a serverless environment. They are considering using Gotenberg as a separate microservice or switching to react-pdf for generating PDFs, needing PDFs to be both downloadable and auto-emailed upon user acceptance. They asked community for advice on server-side PDF generation.
One user suggested using Gotenberg deployed in a Kubernetes cluster, praising its stability [21↑]. Another described building a worker app and deploying it to ECS, using BullMQ for communication between the Next.js app and the worker [9↑].
Another comment mentioned that many scrapers don't work well on serverless environments due to the need to download and install browsers. They recommended hosting a headless browser, such as browserless.io, and running the scraper over CDP [9↑].
One user advised using trigger.dev or Inngest to offload longer server processes like PDF generation when on serverless, or to have a dedicated server for such tasks [8↑].
A Redditor is seeking help with implementing cron jobs in a monorepo using Next.js and tRPC [5↑]. They need to call a tRPC function in a cron job.
One user suggested reconsidering tRPC with the Next.js App Router, saying that React 19 with server actions solves what tRPC solves [-2↓]. They advised creating a normal API route and adding it to the vercel.json file.
Another user disagreed, pointing out that the client side still has its place [7↑]. However, another user agreed that they no longer need tRPC [2↑].
Another user mentioned that for modals or anywhere you need to load information on demand you still need something like React Query [1↑].
A Redditor is facing an issue with their Next.js application where the SideNav client component re-renders on every route change in production mode [6↑].
The user is trying to understand why the SideNav component re-renders even when there is no state or prop change, especially since it needs to be a client component for specific functionalities [3↑].
One user suggested that the issue might be related to state management within the component, where every change is treated as a new page [-2↓]. Another user pointed out the folder structure, especially with dynamic routes, could be the cause of the layout being destroyed and re-rendered on every navigation [-4↓].
Another Redditor questioned the necessity of the "use client" directive in the SideNav component [-2↓].