chore: Upgrade react-router-dom and use-query-params to latest in /ui #4764
+41
−81
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.
What this PR does / why we need it:
Upgrades react-router-dom and use-query-params to their latest versions; the latter is upgraded because its older version didn't work properly with the latest react-router-dom.
One small change in EuiCustomLink is done to avoid the error reported in #3794, I tried clicking everywhere in the UI and didn't see the error after the change.
Which issue(s) this PR fixes:
This allows to use the latest react-router-dom in a consuming app in case someone is using it, no longer being restricted to <6.4.0 due to #3794.
Misc
After the upgrade, react-router-dom writes a warning console message like this:
I tried enabling the flag but it caused issues with our current custom tab routes, and I couldn't sort it out with reasonable effort at this point. Also, since the feature can require non-trivial changes, enabling it might break something in consuming apps that use react-router-dom, so maybe better to leave it later anyway.
I enabled another future flag that I saw a similar console warning about,
v7_startTransition
, since that seems much safer, though I did need to add oneawait
in the tests after that.