I am using a variable below.
var newInput = {
title: this.inputTitle.value,
entry: this.inputEntry.value
};
This is used by my i
I have a similar solution to @Satheesh using React hooks:
State initialization:
const [enteredText, setEnteredText] = useState('');
Input tag:
Inside the event handler function, after updating the object with data from input form, call:
setEnteredText('');
Note: This is described as 'two-way binding'