in "@types/react": "^16.8.2"
this works:
export class Test extends React.PureComponent<void, void> {
render() {
return this.props.children;
}
}
but this doesn't work:
export const Test:React.FC<void> = p => {
return p.children;
};
seems like the functional component should allow bare return of children just as the class component does. Perhaps a mismatch between the ReactNode and ReactElement types?
in "@types/react": "^16.8.2"
this works:
but this doesn't work:
seems like the functional component should allow bare return of children just as the class component does. Perhaps a mismatch between the
ReactNodeandReactElementtypes?