Skip to content
Advertisement

Update Select When New Category Added

hi guys i want to update select options when user add new category can anyone tell me how to do this ?

JavaScript

i want to update option with new item added in this part of code

JavaScript

Advertisement

Answer

If you want React re-render your component when new category added, add local state to it. Here is the updated code:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement