Remove unnecessary dependencies so we no longer need npm install --legacy-peer-deps
#150
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.
Resolves #134.
We have two direct dependencies which do not have new releases that support React 17, but which we no longer need:
enzyme-adapter-react-16
which is orphaned and no longer actually used in tests since@wojtekmaj/enzyme-adapter-react-17
was addedreact-router-last-location
, which was added in Focus new content on route changes #57 as part of a workaround for SPA Accessibility - focus not reset when route changed remix-run/react-router#5210.useA11yRouteChange
to a more simple implementation based onuseLocation
. The focus handler will trigger only if thepathname
property changes (not if only the URL query string changes). This is based on the workaround found in this comment.useA11yRouteChange
, this PR also resolves a regression I described in chore(upgrade): upgrade deps, fix storybook #103 (comment) related to theisAsync
property that stuck around on the route configs after async route support was removed. See that comment for more details.With those two adjustments, all of our production dependencies support React 17 and
npm install
no longer fails when used without the--legacy-peer-deps
flag. There are still a lot of peer dependency warnings related to Storybook's dependencies that are not compatible with React 17. I tried upgrading to the latest Storybook (and also to their prerelease versions) and that didn't resolve those warnings, so I left Storybook alone in this PR and limited its scope to the errors that were causingnpm install
to fail.It seems these warnings may eventually go away if we upgrade to a future version of Storybook which only has dependencies that support React 17. Links I was looking at as part of figuring this out:
I opened #151 to track that after this is merged.