-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Replacement of RefreshLocation? #2243
Comments
@jlongster there are couple of issues on that already. See #2097 or #2038 |
None of those issues really address this. In 0.13 I could just use This was a core design of previous react-router versions and it makes me sad to see it go away. |
The reason this is important is integration with non-React systems. I'm not trying to do anything weird. I just can't only rerender the React parts, and other things mutate the page so I need to fully refresh. |
This should really go on rackt/history, no? i.e. you're saying that there should be a |
@taion Good point. I'm not really sure what the solution is. I'm doing some thinking about it right now. It's easy for me to create own thing that sort of works, but the thing I don't like is not being able to use |
When I extracted the history stuff into its own package, it seemed sufficient to me to think about the problem in terms of URL schemes instead of behavior. What I mean by that is, there are two URL schemes: "clean" URLs (using pushState) and hash-based URLs. My thinking was that you would just choose one scheme and the lib would do the right thing based on what the browser supported. In the case of clean URLs, if the browser supports pushState we use that. Otherwise, we use full page refreshes. Let's follow up in remix-run/history#95 |
interesting, thanks for opening it @jlongster. Now I understand what you meant. sorry for closing. |
In 0.13 there was a concept of a
RefreshLocation
which told he router to refresh the page for every URL change. I don't see a similarhistory
for that. I can see how that makes sense, but how should I go about using react-router but wanting full refreshes?I know it's not a common use case. Right now I just use normal
a
tags instead ofLink
s, and I dowindow.location.href = ...
instead of the previousrouter.replaceWith
. But it would be nice to not have to change make once I can make my site usepushState
.The text was updated successfully, but these errors were encountered: