skip to Main Content

Javascript – TypeScript Generics with React Function Components

I have the following component structure: export interface SearchFilterJobsProps<J = JobPosting> { unwrap?: boolean; jobs?: { data: J[]; component?: React.ComponentType | React.ElementType; }; searchMatchProps?: (keyof J)[]; } export type SearchFilterJobsType<T = JobPosting> = React.FC<SearchFilterJobsProps<T>>; export const SearchFilterJobs: SearchFilterJobsType = <Z…

VIEW QUESTION
Back To Top
Search