Next.js Best Practices You Can't Ignore

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 13

  • @Luisllaboj19
    @Luisllaboj19 หลายเดือนก่อน +1

    More best practices:
    Make sure to make authorization checks on every server action and route handler. After all they’re public endpoints and anyone can hit them from anywhere.
    One thing you could do is moving the database access/request logic part into functions in a separate folder and create a *data access* layer and make sure database read and write operations are always protected and execute after the USER HAS BEEN AUTHORIZED, then you can use these functions inside server actions (for the mutations - “write” logic ) and directly inside server components (for getting data - “read” logic).
    By the time the function executes you’ll be guaranteed the user can perform the operation.

    • @tobitacklestech
      @tobitacklestech  หลายเดือนก่อน +1

      @@Luisllaboj19 Great Addition, thank you!

  • @TALDR27
    @TALDR27 หลายเดือนก่อน

    Great video, I'd love to watch a caching video :D

  • @Serkan_Durgun
    @Serkan_Durgun หลายเดือนก่อน

    I’d like to see more depth videos for caching and seo. Came for i18n tutorial stuck watching the rest of the channel 😂

    • @tobitacklestech
      @tobitacklestech  หลายเดือนก่อน

      @@Serkan_Durgun thank man! I really appreciate that!!

  • @harisnaeem747
    @harisnaeem747 หลายเดือนก่อน

    such a good video, really want you to make a video explaining cache in detail, since the resources online rn are just too confusing

    • @tobitacklestech
      @tobitacklestech  หลายเดือนก่อน

      Yes caching really is a hard topic to explain because there is a lot to handle I think I will make a video when Next 15 is dropping so in a few weeks I guess

  • @cant_sleeeep
    @cant_sleeeep หลายเดือนก่อน

    just use the app router bruv

    • @tobitacklestech
      @tobitacklestech  หลายเดือนก่อน

      I do 🧐

    • @cant_sleeeep
      @cant_sleeeep หลายเดือนก่อน

      @@tobitacklestech it's a meme! please keep making nextjs projects and tutorials

    • @tobitacklestech
      @tobitacklestech  หลายเดือนก่อน

      @@cant_sleeeep haha okay ✌🏼✌🏼