title: Using render in react router dom with a private route
body: <p>Im trying to render two components within a private route using react router dom v4. This is possible using a normal Route but it does not seem to be the case when using a custom Route. I get the following error:
  "Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
  "</p>
  
  Custom route (Authenticated)
  
  <pre><code>return (
        &lt;Route
          {...rest}
          render={props =&gt;
            this.currentUser()
              ? &lt;Component currentUser={this.currentUser} {...props} /&gt;
              : &lt;Redirect
                  to={{
                    pathname: '/auth/login',
                    state: { from: props.location }
                  }}
                /&gt;
          }
        /&gt;
      )
  </code></pre>
  
  Then in my routes i want something like this
  
  <pre><code>return (
        &lt;div&gt;
          &lt;Switch location={isModal ? this.prevLocation : location}&gt;
            &lt;Authenticated path="/" exact component={Main} /&gt;
            &lt;Route path="/auth/register" exact component={Register} /&gt;
            &lt;Route path="/auth/login" exact component={Login} /&gt;
            &lt;Authenticated
              path="/clients/:id/edit"
              render={(props) =&gt; ( // Not working as expected. Works fine using Route instead of Authenticated
                &lt;div&gt;
                  &lt;Main /&gt;   
                  &lt;ClientEdit /&gt;
                &lt;/div&gt;
              )}
            /&gt;
          &lt;/Switch&gt;
          {isModal ?
            &lt;Authenticated
              path='/clients/new'
              component={ClientNew}
            /&gt;
          : null}
          {isModal ?
            &lt;Authenticated
              path='/clients/:id/edit'
              component={ClientEdit}
            /&gt;
          : null}
        &lt;/div&gt;
      );
  </code></pre>