04 Nov 2021   react


Use JSX.Element when you want to accept a component as a prop:

interface Props {
  rightContent: JSX.Element;
}

class Content extends Component {
  render() {
    <Row>
      <Text>Hi There</Text>
      <RightContent>{this.props.rightContent}</RightContainer>
    </Row>
  }
}