Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const [data, setData] = React.useState({images_group:[], categories: [0]})
- const getCategoryData = async () => {
- const result = await axios(
- `http://api.com/api/product?categoryId=${data.categories[0].categoryId}`
- )
- setDataCategory(result.data)
- console.log("product category", result.data)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement