I have the following JSX code -
export default function AppliedRoute({ component: C, appProps, ...rest }) {
<Route {...rest} render={props => <C {...props} {...appProps} />} />
return <Route {...rest} render={props => <C {...props} {...appProps} />} />;
}
I want to convert this to typescript, and need to set the component that is being passed in and set as the route component (i.e. via component: C) to a type but cant figure out the syntax for this. If it was just the destructured component object property I could use {component}: {component:any}, appProps.. etc
but I dont know the proper syntax when the property is being set to another property for use in the route component call. I would assume the property C would also need a type?
Thank You.