I want to define defaultprops for my pure functional component but I get a type error:
defaultprops
export interface PageProps extends React.HTMLProps
You can type Page like this:
Page
const Page: StatelessComponent = (props) => ( // ... );
Then you can write Page.defaultProps without needing to cast to any (the type of defaultProps will be PageProps).
Page.defaultProps
any
defaultProps
PageProps