Answer the question
In order to leave comments, you need to log in
Is it possible to use Generic between two different React components?
Let's say there is a SelectableListComponent of the form:
export interface ISelectableListProps<T extends { isDisableInList?: boolean }> {
items: T[];
key?: React.ReactText;
itemTemplate: (item: T) => JSX.Element;
}
const SelectableListComponent = <T extends {}>(props: ISelectableListProps<T>) => <></>
SelectableListComponent.SubComponent = () => <></>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question