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
I am currently working on an app that has two different types of dashboards: 'Staff' and 'Admin'. To improve the user experience, I have implemented code splitting for these two dashboards so that all pages for a specific dashboard are fully loaded when a user logs in. However, I am wondering if this is the best approach or if there is a nicer way to do this. 🤔
Additionally, I am now looking to migrate to the new data router in React Router v6. Is there a way to achieve this same behavior with the data router? ❓
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.
-
Hey everyone 👋,
I am currently working on an app that has two different types of dashboards: 'Staff' and 'Admin'. To improve the user experience, I have implemented code splitting for these two dashboards so that all pages for a specific dashboard are fully loaded when a user logs in. However, I am wondering if this is the best approach or if there is a nicer way to do this. 🤔
Additionally, I am now looking to migrate to the new data router in React Router v6. Is there a way to achieve this same behavior with the data router? ❓
Here is my current code for the App.js file:
and for the admin.js and staff.js file:
I would really appreciate any suggestions or advice on how to improve this code or how to achieve this behavior with the new data router. 😄
Beta Was this translation helpful? Give feedback.
All reactions