I'm trying to create a page with react, for that I'm using typescript.
In the project there is a component that is an input and in it I want there to be an onChange function, but when I put it in the component, it has a red dash, indicating that there is an error, how could I pass the onChange correctly? I know how to do it using javascript, but not with typescript.
I made the code as follows:
import { StyledInput } from "./Input.styles";
export const Input = ( { onChange } ) => {
return(
<StyledInput onChange={onChange}/>
)
}