-
Notifications
You must be signed in to change notification settings - Fork 962
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
Roadmap #689
Comments
Should blocking be removed in v5 or v6? If v5 removes blocking, then it wouldn't be compatible with RRv5 because of the edit: To expand, my thinking was that we would treat v5 like a minor release with no new "features", just no encoding and any bug fixes. Then, React Router could release a patch with its |
Excellent point, @pshrmn. We'll reserve the pared down version for v6. I have adjusted the version numbers to reflect this change. |
For v6, one possible change is to merge the This would get rid of the issue with pushing the same location resulting in two session entries as well as simplify the API. history.navigate(to);
history.navigate(to, "PUSH");
history.navigate(to, "REPLACE"); I did this with my implementation and it looks like Ryan did a similar thing with reach. // hickory
history.navigate({ pathname: "/somewhere", state: { success: true } });
// reach
history.navigate("/somewhere", { state: { success: true } }); |
I designed it the way I did in @reach/router because: Usually you just want But then you realize you want some state so I optimized for this really simple change: - navigate('/somewhere')
+ navigate('/somewhere', { state: 42 }) Compared to this change: - push("/somewhere")
+ push({ pathname: "/somewhere", state: 42 }) Or you realize you want to "replace" instead of "push" and so I optimized for that change as well: - navigate('/somewhere')
+ navigate('/somewhere', { replace: true }) I also found I often wanted to replace or push based on some application state, which is really lovely: navigate("/somewhere", { replace: middleOfCheckoutFlow }) Rather than an if / else block for "push" vs. "replace". All that said, I do like the idea of 100% symmetry with |
This issue is a high-level roadmap for all work that we intend to accomplish, grouped by release. The goal is to provide an expected release version for a given piece of work.
The goal is not to discuss specific release dates, though some of that may happen.
This list is by no means exhaustive and will change from time to time as new issues are opened and PRs are merged.
4.10
Ignore initialpopstate
in some older browsers (Fix history.listen triggered by initial page load on some old browsers #555)4.11
history.createHref
when<base>
tag is present (Fix base tag hash history create href #578)history.replace
when<base>
tag is present (Ignore <base href> in hash history replace #577)createHref
is used with an object (Reset search with question mark value to the empty string #701)console.warn
instead ofconsole.error
when same path is pushed using hash history (Make hash history "same path" warning use console.warn #488)5.0
Fix some long-standing issues, update browser support level, and introduce a few major new features.
pushState
history.block(onBlock)
API, removegetUserConfirmation
require('history/*')
)import from 'history/*
)keyLength
option fromcreateBrowserHistory
5.x
window
option increateBrowserHistory
andcreateHashHistory
(createBrowserHistory with a specific window object #624)createLocation
andlocationsAreEqual
basename
increateBrowserHistory
andcreateHashHistory
..
pathname resolutionhistory.length
increateBrowserHistory
andcreateHashHistory
history.goBack
=>history.back
,history.goForward
=>history.forward
history/browser
andhistory/hash
bundles for singleton instances6.0
Focus on getting the library size down by removing unnecessary features.
createLocation
andlocationsAreEqual
basename
increateBrowserHistory
andcreateHashHistory
..
pathname resolutionhistory.length
increateBrowserHistory
andcreateHashHistory
history.goBack
andhistory.goForward
The text was updated successfully, but these errors were encountered: