I'm putting this the line below so it will show as a new comment. You need to move the onchange function from setState to the constructor.