Author Name Chris Fidao Social Media Image by https://annieruygtillustration.com/ The deal with React is that I don't want it, but I'm jealous of the quality of React components.
When combined with a text input, we get a list of stuff that a person can select.
If you select an option from the list of possible values, it will update the text input's value.
// If we find the selected option, grab the // machine-readable ID from the data-value attribute if (selected) { let id = selected.dataset.value console.log('selected value is:', id)} }