<Route component={(props) => <ProtectedRoutes isAuthenticated={isAuthenticated} setIsAuthenticated={setIsAuthenticated} children={props.children}/>}> <Route path="/" component={Home} /> <Route path="/some-route" component={SomeRoute} /> <Route path="/some-other-route" component={SomeOtherRoute} /></Route>