550 viewsNext Amazona

Hi I first want to start off with saying thank you for your next.js video. I am following along but I am trying to update it to next.js 13 instead of the version 12 the video is based on. I am having weird issues with the product details page. I have my api router handler that gets the slug and returns the proper data, but for some reason I keep getting this error. “Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.” I have tried many things to fix it, asked chat gpt, looked through the documentation and just can’t figure out why I am having this issue when I am using the same formatted objects to render all of the cards in the home page. I’m not sure if you are familiar with the next.js version 13 yet but if you could help me I would be so very grateful.
You can reach me at macortinas99gmail.com or my phone number 512-903-9393. I look forward to hearing back from you.

Bassir Changed status to publish November 26, 2023

hello there,

when you get this error:

Error: Objects are not valid as a React child (found: [object Promise])

it means you missed await somewhere in your code, where you get data from backend.

I’m working on the new version of next ecommerce amazona course and it will be added to my course here:


Bassir Answered question April 10, 2023
You are viewing 1 out of 1 answers, click here to view all answers.