DEV Community

Discussion on: How to render different components based on the selected option?

Collapse
 
jrgiant profile image
Joshua Rose

If you use a standard select be aware that the 'Change' event will occur each time a user uses the arrow key on the closed select tag.

That being said, I have an application that shows the choices as a scroll-able table the user selects the item from that and the app renders a component with that specific data (i.e. it routes to that page in the SPA). The scroll-able table is easy to implement and allows the user to select the item they want without the extra change event calls caused by the standard select item. IMO