Taking input from an input field in React