title: How to include render method as attribute to Route using Reach Router?
body: <p>I want to make protected route using Reach Router. In React Router v4 I could use Route render() method to achive this:</p>
  
  <pre><code>function PrivateRoute({ component: Component, ...rest }) {
    return (
      &lt;Route
        {...rest}
        render={props =&gt;
          fakeAuth.isAuthenticated ? (
            &lt;Component {...props} /&gt;
          ) : (
            &lt;Redirect
              to={{
                pathname: "/login",
                state: { from: props.location }
              }}
            /&gt;
          )
        }
      /&gt;
    );
  }
  </code></pre>
  
  <p>and then declare route:</p>
  
  <pre><code>&lt;PrivateRoute path="/protected" component={Protected} /&gt;
  </code></pre>
  
  <p>I don't know how to access or modify render() method in Reach Router: </p>
  
  <pre><code>&lt;Router&gt;
          &lt;Results path="/" /&gt;
          &lt;Details path="/details/:id" /&gt;
  &lt;/Router&gt;
  </code></pre>
  
  <p>How can I do this using Reach Router? There has to be a better way then writing conditions in render() method inside a protected component.</p>