DEV Community

Discussion on: Real Time Searching In ReactJS

Collapse
lukeshiru profile image
LUKESHIRU

Remeber to set the value attribute of input to match the currentState:

<input
    onChange={event => setList(event.currentTarget.value)}
    placeholder="search..."
    type="text"
    value={list}
/>
Enter fullscreen mode Exit fullscreen mode

Cheers!