You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone,
Is below approach correct? will it cause any performance issues or any extra number of rerenders? I think this would be simpler and easier to manage over time but is it how it is meant to be used?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
Is below approach correct? will it cause any performance issues or any extra number of rerenders? I think this would be simpler and easier to manage over time but is it how it is meant to be used?
function App() {
const privateRoute = useRoutes(PrivateRoute());
const publicRoute = useRoutes(PublicRoute());
return checkIfUserIsAuthenticated() ? privateRoute : publicRoute ;
}
Note: public route consist of login screen which is not available in private route
Beta Was this translation helpful? Give feedback.
All reactions