Y
Hacker News
new
|
ask
|
show
|
jobs
by
haukur
3309 days ago
In case anyone reads this and is left wondering, there's no need to have n functions to handle n inputs - you only need one. A simple example would be to set the state based on `event.target.name`.