When to use Next.js

Поделиться
HTML-код
  • Опубликовано: 28 янв 2025

Комментарии • 31

  • @maykrpc
    @maykrpc Месяц назад +2

    I am building a SPA with Next.js, and all the things you said are very true. I considered switching to Vite because I do not use the features that Next brings to the table, and I will not get all these types of errors resulting in a slowdown in development. Additionally, Vite is really fast in the development environment.

    • @tenacityzx
      @tenacityzx  Месяц назад +1

      I agree, look on the bright side of it, you learned a great lesson for your next projects.

  • @last.journey
    @last.journey 22 дня назад

    Correct me if I'm wrong !
    Adding 'client side' on top of every file you have is much easier than learning another framework
    And next js uses react so much of the tools that works on react would work on next js as well
    Secondly who said that you can't use next js as a frontend only and not as fullstack in fact if you used any backend fw you would still have to use a frontend to communicate with the backend and i see no problem on using next js for that

    • @tenacityzx
      @tenacityzx  22 дня назад +3

      You can use for example Vite with React or Remix, it's still React and you won't need to learn a new framework.
      Imagine this example, if you build something and 70% of the features of Next.js become obsolete. You will be using a framework with an overhead that is not needed. It's like using a car to somewhere that's one minute away.
      One factor that is also import is what you feel comfortable with, so if you feel comfortable with Next.js then use it, but it does not mean it's always the right choice.

  • @another-day-2024
    @another-day-2024 28 дней назад

    We have to build a B2B system where our clinet can save their projects, can assign to others, can use AI to automate few stuff. Do you think NextJs will be good for this case?

    • @tenacityzx
      @tenacityzx  27 дней назад +1

      So it's a project management application, maybe something like Jira but with some AI integrations?
      I don't see a use case for SSR or really fast page loads or the need for the site to be indexed well. I presume that the clients will want their projects private and not seen by other people so I would not use Next.js there.

    • @another-day-2024
      @another-day-2024 27 дней назад

      @@tenacityzx yeah client wants a simple project management module, but they have other stuffs they want. In general, I don't think any dashboard which are behind login/authentication should go for NextJs. In fact, if its decoupled it will be lot easier to scale up/down based on load.
      I spent quite some time recently on NextJs and thats what I figured.
      But there are places where SSR can be really helpful. I really wish something like Remix are still around.

  • @mohammed.haydar
    @mohammed.haydar Месяц назад +1

    Can't you just use Next.js Pages directory when needing to opt in client stuff mainly in your application? That'd would be great as you can still use SSR/SSG when needed.

    • @tenacityzx
      @tenacityzx  Месяц назад +1

      App router is the path that Vercel is taking and it has all the latest React features. Using the pages router is fine but migrating to App Router is recommended to use React's latest features.

  • @rodrigommfreitas
    @rodrigommfreitas Месяц назад +3

    I think people use nextjs way too much. I don't really like Vercel that much. If SEO isn't needed, Vite+React is fine, if SSR is needed there are other options such as remix, for static Astro all the way. I was using Next for simple static pages but now I'm going all in on Astro, it's simple, performant, fast

    • @tenacityzx
      @tenacityzx  Месяц назад

      I agree

    • @Ouyiggh8807
      @Ouyiggh8807 8 дней назад

      People use it because it's a good framework

  • @sabihass5361
    @sabihass5361 Месяц назад

    thank you

  • @prashlovessamosa
    @prashlovessamosa Месяц назад +1

    Please create some tuts like you used to do

    • @tenacityzx
      @tenacityzx  Месяц назад +1

      Yes I will, what tutorial would you like to see?

    • @prashlovessamosa
      @prashlovessamosa Месяц назад

      @tenacity_dev for example tanstack router or router v7 as framework approach as an alternative to NextJS

    • @prashlovessamosa
      @prashlovessamosa Месяц назад

      @tenacity_dev like router v7 framework approach.

    • @theperson624
      @theperson624 Месяц назад

      ​@@tenacityzx Beginner guide for getting started on MERN stack or maybe regarding React

  • @shahzaibshahzaibkhan6480
    @shahzaibshahzaibkhan6480 Месяц назад +1

    Well shit, I need everything both in the dos and the donts 😂

    • @tenacityzx
      @tenacityzx  Месяц назад +1

      Hahahaha, well then split the app and set a reverse proxy to route the SSR needed pages to Next.js and the other ones to Vite app

  • @prashlovessamosa
    @prashlovessamosa Месяц назад

    I don't know why RUclips deleted my comments I am asking for router v7 tut as a framework approach.

  • @2gbeh
    @2gbeh Месяц назад

    This is technically Next.js pages router vs. app router. So basically still use Next which ever way.

    • @tenacityzx
      @tenacityzx  27 дней назад

      App router is the path that Vercel is taking and it has all the latest React features. Using the pages router is fine but migrating to App Router is recommended to use React's latest features.

  • @shanemarchan658
    @shanemarchan658 Месяц назад

    They are holding ssr by the ballsacks rn, as soon as vite ssr is up to par thats it for nextjs.

    • @tenacityzx
      @tenacityzx  Месяц назад +1

      A huge complaint about Vercel and Next.js is that the Vercel team is working with the React team. It leads to issues where the React team will align to Vercel's goals and it's a sure way to be accused of being uncompetitive or accused of doing shady stuff.

  • @jesussantander6511
    @jesussantander6511 Месяц назад

    Quick response: Never.

    • @tenacityzx
      @tenacityzx  Месяц назад

      Many people have that opinion and have been switching to Remix lately

  • @staravelli1207
    @staravelli1207 Месяц назад +1

    I’m using next js to make a uav flight planner app with cesium and it is heavily client side. I chose to use Next for scalability as the alternative would have been vanilla html/css/js which is how the CesiumJs documentation assumes you will be using it. I have made components that are highly composable meaning I can generate a whole new viewer simply by dropping a in a page.tsx
    I’m not entirely sure why you would say making a client side app is not the right use case for next as I’ve found Next js to be highly beneficial for this heavily client side app.

    • @tenacityzx
      @tenacityzx  Месяц назад +4

      Next.js works well if you're comfortable with it. For primarily client-side apps, Vite+React with TypeScript offers faster development and smaller bundles. These tools provide the same component architecture benefits while being lighter weight.

    • @staravelli1207
      @staravelli1207 Месяц назад

      @ I definitely feel a bit of a safety net working in Next haha. I think I might give Vite a try for smaller bundling sizes as Cesium uses Webworkers to stream tile data and trying to load my web app on a drones’s RC is a useless attempt (I think they reserve 5.8Ghz frequency for radio link so I’m stuck with 2G data transfer speeds). I wonder if Vite would solve this

    • @tenacityzx
      @tenacityzx  Месяц назад

      @@staravelli1207 I understand you totally, working with something you are comfortable with is also a huge benefit when wanting to implement a functionality. It won't hurt you to try, when you try new things you learn and your view expands on what is good and what not, you form opinions and get experiences which grow you as an engineer and person.