Skip to content
Discussion options

You must be logged in to vote

You will create a new router instance on each render of App, if you have any unexpected render it will trigger every loader again.

The router instance is recommended to be created once when the app loads, if you need to pass the auth status and user role, it's better to get it in the loaders directly by moving them to outside React.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@predofrazao
Comment options

@sergiodxa
Comment options

@predofrazao
Comment options

@sergiodxa
Comment options

@predofrazao
Comment options

Answer selected by predofrazao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants