I am trying to use react to recreate my currents components (written in pure typescript) but I can\'t find a way to give additional props to a component extending an other.
You'll need to make DataTable
generic so that you'll be able to use an interface which extends DataTableProps
:
export interface AnimalTableProps extends DataTableProps {
onClickFunction: Function;
}
export class DataTable extends React.Component { }
export class AnimalTable extends DataTable {
render() {
// this.props.onClickFunction should be available
}
}