componentWillUnmount() {
        unmounted = true;
      }
      render() {
        return <span prop="Class" />;
      }
    }
    function FunctionalComponent(props) {
      return <span prop="Function" />;
    }
    function Foo(props) {
      return (
        <div>
          {props.useClass ? (
            <ClassComponent />
          ) : props.useFunction ? (
            <FunctionalComponent />
          ) : props.useText ? (
            'Text'
          ) : null}