I am working on the t-shirt store application . In which there are Admin controls the all the categories of products and the all of the products . I created ManageProducts component which handle the updating and delating the products by the admin . When I render it without any function it works properly and displaying all of the buttons . But when I add the mapping function in it, it does not displaying buttons and the products details . Also there is no any error in console ...
Here is the code https://codeshare.io/5eEzeK
Please anyone help me to sort out this problem...
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
What is your
products
variable set to? You set it initially to an object{}
, so I'll assume that it gets set to an object after yourgetProducts
method. If so,map
doesn't work on an object - it is an array method. Andproduct.length > 0
will return false, so that entirediv
will not be rendered