I have a parent component like so
import filterComponent from 'filter/filterComponent'
const reloadHandler = useCallback(
(event: MouseEvent) => {
event.preventDefault();
// my logic
},
[Reload, Fetching]
);
const parent = () => {
return (
<filterComponent reload={reloadHandler} />
)
}
Filter Component:
export const filterComponent = (filter: Function, reload: Function) => {
return (
<Button onClick={reload} />
)
}
error:
Type '{ reload: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & Function'. Property 'reload' does not exist on type 'IntrinsicAttributes & Function'
How do I solve this?