shonen295
KPCKevin Powell - Community
•Created by typeops on 7/15/2024 in #front-end
Please help me with this
I think you should write <Button></Button>
like this
6 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
"as long as it works it is fine" XD
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
i think this will work we were sending option in wrong format
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
const formattedCategories = response.map(category => ({
value: category.id,
label: category.name
}));
setCategories(formattedCategories);
this was given by chatgpt have you tried this ?
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
you don't have to be its not you fault 😆
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
this should have worked
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
try this
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
setCategories([response[0].name])
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
can you show some more code
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
weird
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
have you use h.map anywhere ?
121 replies
KPCKevin Powell - Community
•Created by roelof on 3/16/2024 in #front-end
react why is setCategories is not defined error
instead of
setCategories(response)
trysetCategories(response[0].name)
121 replies