310 viewsMern Amazona
0 Comments

In the 12th video, the product name is not appearing on my page. The code is as follows:

return ({slug});

When the code is like this, everything works fine. However, when I update it to:

return loading ? (
  Loading...
  ) : error ? (
  {error}
  ) : (
    {product.name}
   );

The page appears blank. I can’t see any errors anywhere. Could you please help?

Bassir Answered question February 9, 2024

first of all check console for any errors. if any then share it here.
if there is no error it means product.name is empty. check its value using console.log

Bassir Answered question February 9, 2024
You are viewing 1 out of 1 answers, click here to view all answers.