there is a issue in lesson-08-Fetch Products code (Link)
your code is
{products.map((product) => (
but the corrected one is as below
{products?.map((product) => (
because--
use products?.map then it will render correctly because we have fetched the data by sending request to API so first we have to check if the "products" existed or not.
there is a issue in lesson-08-Fetch Products code (Link)
your code is
{products.map((product) => (
but the corrected one is as below{products?.map((product) => (
because--
use
products?.map
then it will render correctly because we have fetched the data by sending request to API so first we have to check if the "products" existed or not.