How to define defaultProps for a stateless react component in typescript?
You can type Page
like this:
const Page: StatelessComponent<PageProps> = (props) => (
// ...
);
Then you can write Page.defaultProps
without needing to cast to any
(the type of defaultProps
will be PageProps
).