Skip to content

Update reactrouter monorepo to v6.0.0-alpha.3 #17

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

Merged
merged 1 commit into from
May 4, 2020

Conversation

ScriptedAlchemy
Copy link
Member

This PR contains the following updates:

Package Type Update Change
react-router dependencies patch 6.0.0-alpha.2 -> 6.0.0-alpha.3
react-router-dom dependencies patch 6.0.0-alpha.2 -> 6.0.0-alpha.3

Release Notes

ReactTraining/react-router

v6.0.0-alpha.3

Compare Source

Major Features

  • Added a new useSearchParams hook (see f59ee54)

The useSearchParams hook returns a URLSearchParams object created from the current location.search string. This is a feature that people have wanted for a while, but we were always hesitant to ship a full-blown query parser with the router. Well, now that we have URLSearchParams widely available, we don't have to. I wrote up a small guide about how to use useSearchParams if you'd like to read more.

Major Changes

Warning: This release breaks compatibility with 6.0.0-alpha.2

  • Redirect (and redirectTo in useRoutes) was removed (see cbcd398)
  • We no longer support redirecting on the initial render, due to compatibility issues with future versions of React

React won't let us change the state in an ancestor component on the initial render w/out warning, so we had to remove the <Redirect> component, as well as the ability to do a navigate() on the initial render. You can still render a <Navigate>, but it won't actually update the page until the next render.

If you really need to redirect on the initial render, you can either a) do it on your server (probably best, so it can be cached at the HTTP level instead of doing it in every user's browser) or b) do it outside of React Router (e.g. using the history API directly).

Installing

Development for v6 is happening on the dev branch.

If you'd like to test it out, install from npm:

$ npm install react-router@next react-router-dom@next

Or, if you're on React Native:

$ yarn add react-router@next react-router-native@next

We are actively working on documentation. For now, if you're just interested in testing things out you may be interested in the getting started guide. If you're interested in upgrading an existing app, please check out the v5 to v6 migration guide.

Enjoy!


Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@ScriptedAlchemy ScriptedAlchemy merged commit c53318d into master May 4, 2020
@ScriptedAlchemy ScriptedAlchemy deleted the renovate/reactrouter-monorepo branch May 4, 2020 01:50
newvladimirov pushed a commit to newvladimirov/module-federation-examples that referenced this pull request Jul 17, 2020
newvladimirov pushed a commit to newvladimirov/module-federation-examples that referenced this pull request Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant