-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: AppRouter component #131
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alexasselin008
previously approved these changes
Jan 16, 2024
alexasselin008
approved these changes
Jan 16, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Disclaimer
While fixing the
AppRouter
component it became clear that the current implementation is not good enough and that the wholeAppRouter
component should be refactored into something else.However, as we must ship the platform, it's not the time to do so. Therefore, the current PR fix the ongoing issues and a refactor will be done at a later time.
Changes
AppRouter (BREAKING CHANGES)
AppRouter
component now requires to define aRouterProvider
as a child. This change has been made to provide more flexibility on the consumer side about the definition of the React Router router.Before:
Now:
AppRouter
component doesn't equipe correctly the handlers to dispose of previous HTTP requests if they are called multiple times because of re-renders. Therefore, the handlers now receives an AbortSignal that should be forwared to the HTTP client initiating the fetch request.isPublicDataLoaded
andisProtectedDataLoaded
) indicating whether or not the public and/or protected data has been loaded.useNavigationItems (BREAKING CHANGES)
useNavigationItems
hook now accept an object literal of options rather than an optionalmenuId
argument.Before:
Now: