create another example for setting state

state is set by typing stuff in input box