I'm having a problem making this code
const AuthInit = (props: any) => {
let {children: WithChildren} = props;
...
return showSplashScreen ? <LayoutSplashScreen /> : <>{children}</>
}
compile, I have to use props.children
and remove the destructured line for it to work. Why is that? and how can I make it work
type WithChildren = {
children?: ReactNode
}
error: TS2304: Cannot find name 'children'.