Conditional Rendering in React won't work, state not working properly?
You expect the output component to have productList
and searched
as props however you pass it data
as a prop
Secondly you must define the interface directly and not as a function
interface OutputProps {
searched?: string
productList?: Product[]
}
...
<Output searched={searched} productList={productList}/>