Setup NextJs 14 with MongoDB and Mongoose | React | instrumentation

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

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

  • @marcuswhiteley9425
    @marcuswhiteley9425 5 месяцев назад +1

    Hi! You just explained in 16 minutes something that I could not find anywhere else!

  • @CodeChaos-jd2be
    @CodeChaos-jd2be 7 месяцев назад

    I cant express how helpfull this vid is ,Really thankfull for this

  • @thebestcodes
    @thebestcodes 8 месяцев назад +1

    I needed this the other day. Super handy video, thanks! 😀

    • @CulesCoding
      @CulesCoding  8 месяцев назад +1

      Glad it was helpful!

  • @DynamicCorp242
    @DynamicCorp242 5 месяцев назад

    Je viens de découvrir la chaîne RUclips,je m'abonne

  • @pinsaramallawarachchi8201
    @pinsaramallawarachchi8201 5 месяцев назад

    Thanks a lot

  • @marcuswhiteley9425
    @marcuswhiteley9425 5 месяцев назад

    Hi. I'm getting an error.
    Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.
    It posts to the database on submit, but then throws the error. It doesn't indicate which component is causing the problem.

    • @CulesCoding
      @CulesCoding  5 месяцев назад

      I think you are passing unserializable data. react.dev/reference/rsc/use-server#serializable-parameters-and-return-values
      If you are passing a mongoose response try calling to `toObject` method. i.e `blog.toObject()`

    • @marcuswhiteley9425
      @marcuswhiteley9425 5 месяцев назад

      @@CulesCoding Hi. Thanks for getting back. I think it is caused by "return newPost.save();" in the action file. It replicates what you did, so I don't know why it's giving me an error and not you!

    • @CulesCoding
      @CulesCoding  5 месяцев назад +1

      may be try removing the `return` keyword and await the save method.