typescript otherprops

Solutions on MaxInterview for typescript otherprops by the best coders in the world

showing results for - "typescript otherprops"
Lilia
06 Jan 2019
1interface CustomComponentProps  {
2  prop1: string; 
3  prop2:string;
4}
5const CustomComponent: React.FC<CustomCompoenetProps & Record<string,any>>  = ({prop1,prop2, ...otherProps}) =>  {
6  retrun (
7    <>
8      <Component prop1={prop1} prop2={prop2} {...otherProps}/>
9    </>
10  );
11
12} 
13export default CustomComponent
14