Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

input to state

return (
    <div>
      <form>
        <input
          type="text"
          value={name}
          onChange={(e) => setName(e.target.value)}
          placeholder="Your Name"
        />
        <p>{name}</p>
      </form>
    </div>
  );
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #input #state
ADD COMMENT
Topic
Name
3+4 =