chore(router): replace react-router-dom v6 with react-router-dom-v5-compat #1529
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.
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Fixes: #1528
Description of the change:
This change replaces the current react-router-dom dependency (and its imports) with react-router-dom-v5-compat
Motivation for the change:
The react-router-dom-v5-compat pack contains the APIs for both v5 and v6 of the router, so no functional changes are required. This change is necessary for the Console Plugin, which only has react-router-dom v5.3.x and react-router-dom-v5-compat v6.11.2 as shared modules. This change allows for the pages that contain
useNavigate
to render without errors in the Console.As mentioned in the issue I've linked, there is (were) intentions to update the Console to provide react-router v6 to dynamic plugins, and when that time comes this PR can just be undone.