Open
Description
Example: We create High-level component package with strong typed how the lower components designed to be.
type Avatar: () => JSX.Element;
interface ILoginProps {
accounts: object;
setFormType: Function;
children: Avatar;
}
class Login extends React.Component<ILoginProps, ILoginState> {
public static propTypes = {
Avatar: React.PropTypes.func,
}
public render(): JSX.Element {
const { Avatar } = this.props
return (<Avatar/>)
}