1

i have this form where it has a input field ones i submit the form i want the entered text to be removed from the input filed

 <form id="chat__form" onSubmit={sentchat}>
          <input
            className="chattype"
            id="text-message"
            onChange={inputsHandler}
            type="text"
            placeholder="Type your message here ..."
          />
          <button type="submit">Send</button>
        </form>

example i typed hello world and clicked submit after submission i want it to be removed from input fild and input field must remain empty

vivek kn
  • 107
  • 1
  • 18
  • 45

0 Answers0