Open letanloc1998 opened 2 years ago
I have waited on the merger of PR #911 for a while. As a workaround, I have created use-hash-history, which provides a Proxy around history
in <200 lines of typescript.
hashType: "noslash"
is possible in my proxy with hashRoot: ""
hashType: "hashbang"
is achieved with hashRoot: "!/"
It seems this issue may go unaddressed because this rejected issue is not a concern for react-router. It seems history
exists primarily to serve React Router, according to @mjackson:
The goal with history v5 is to make this library just an implementation detail of React Router v6
@ryanflorence declared this issue was not a priority for React Router:
Thanks but we'll keep the
/
:)
@timdorr confirmed that:
As Ryan mentioned, this isn't going to be implemented
This feature would be nice to have, but Remix is paid to do things, and keeping "backwards support" for prettier URLs might not serve their goals as an organization at the moment.
Other related issues:
does this work with react-router-dom@6.5.0?
Hi,
I see
HashRouter
on v6 can't usehashType={"noslash"}
.If I use
BrowserRouter
, a host must fallback from 404 to index and it takes long time (I deployed my code on gitlab page and it takes 1.5s to processor).However,
HashRouter
on v6 can't handle link/#*
, it only hanle link/#/*
. Eg: if I go to/#notExistLink
, it doesn't redirect to not found route.Does any one have solution to fix this issue?
Thanks.
.gitlab-ci.yml