#React map the object and create tag for different variable

2 messages · Page 1 of 1 (latest)

lament remnant
#

this can be done using useState hook, for example i can create two buttons first is user and second is product and on clicking the button i can inject the the "ObjectName" into it.

and then use the state to map it so it will show the data accordingly or you can hide or unhide the data using conditional operators

desert tree
#

actually there diffent url for users and product and I am using this as reusable so i dont have to create diffrent code file for both .