title: Route(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null
body: <p>i am trying to make a protected route but when i click to the login button it always gave me this error </p>
  
  <p>Route(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.</p>
  
  <p>Thanks in advance </p>
  
  <pre><code>   import VideoStream from "./Components/VideoStream"
     import ScreenShare from "./Components/ScreenShare"
     const Auth = {
     isAuthenticated: false,
     authenticate(cb) {
      this.isAuthentecated = true
      cb()
    },
      signOut(cb) {
      this.isAuthenticated = false
      cb()
    }
  }
  
      const PrivatRoute = ({ component: Component, ...rest }) =&gt; {
      return (
      &lt;Route
        {...rest} render={props =&gt; {
          if (Auth.authinticate === true) {
            return (&lt;Component {...props} /&gt;
            )
          }
          else {
            alert("ashraf")
  
          }
        }
        } /&gt;
     )
    }
     class App extends Component {
     render() {
      return (
        &lt;div className="App"&gt;
  
          &lt;BrowserRouter&gt;
  
  
            &lt;Switch&gt;
  
              &lt;Route exact path="/ScreenShare" component={ScreenShare} /&gt;
              &lt;Route exact path="/" component={Home} /&gt;
              &lt;PrivatRoute exact path="/VideoStream" component={VideoStream} /&gt;
  
            &lt;/Switch&gt;
  
          &lt;/BrowserRouter&gt;
        &lt;/div&gt;
      );
      }
     }
  
     export default App;
  </code></pre>