Here is my code for HomeScreen.js
import React, { useState } from 'react';
const HomeScreen = (props) => {
const [searchValue, setSearchValue] = useState("");
const handleSearchInputChanges = (e) => {
setSearchValue(e.target.value);
}
const resetInputField = () => {
setSearchValue("")
}
const callSearchFunction = (e) => {
e.preventDefault();
props.search(searchValue);
resetInputField();
}
return (
<form className='search'>
<input
value={searchValue}
onChange={handleSearchInputChanges}
type="text"
/>
<input onClick={callSearchFunction}
type="submit" value="SEARCH" />
</form>
);
}
The error: 'View config getter callback for component 'input' must be a function (recieved 'undefined'). Make sure to start component names with a capital letter.
I'm assuming there is something I didnt do to allow input to work but I'm just not sure what. Any help is appreciated.