Open
Description
Hello,
I have a little confusion with what is explained in the Effect section about the propagation of data.
Brian says that propagation happens when setBreed("")
is called. I understand that, but I decided to comment that line and just call setBreeds([])
instead. Surprisedly, the propagation happened, that means that the BreedDropdown re-rendered.
This is my main doubt.
Why the BreedDropDown updates? If I updated Breeds only. The main relation I can see between Breeds and BreedDropdown is the statement const [breed, BreedDropdown, setBreed] = useDropdown("Breed", "", breeds);
. If some input of the hook is updated, this is re-rendered? or it is just a misunderstanding?
Thank you for reading my issue.
Metadata
Metadata
Assignees
Labels
No labels