Update Function Names

This commit is contained in:
Philipp Klüter
2021-04-05 12:11:02 +02:00
parent bf3fc6b524
commit 8e2a7f492d

View File

@@ -20,9 +20,9 @@ class App extends Component {
.then(response => response.json()).then(
users => this.setState({ monsters: users })
)
}
}
handleChange = e => {
onSearchChange = e => {
this.setState({ searchField: e.target.value })
}
@@ -34,11 +34,11 @@ class App extends Component {
return (
<div className="App">
<div className="App">
<h1>Monster Rolodex</h1>
<SearchBox
placeholder='Search Monsters'
handleChange={this.handleChange}
handleChange={this.onSearchChange}
/>
<CardList monsters={filteredMonsters} />
</div >