i have a Parent Component and i pass RouteComponentprops like below,
function Parent({ history }: RouteComponentProps) {
//some logic
}
Now i want to add a prop OpenByDefault to the Parent component like below,
interface Props {
OpenByDefault?: boolean;
}
function Parent({OpenByDefault = false}: Props) {
//some logic
}
i am not sure how to add {history: RouteComponentProps} to this Props as well.I am new to using typescript. could someone help me with this. thanks.