-
Notifications
You must be signed in to change notification settings - Fork 961
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
V2 #182
Conversation
The only thing I'm a bit hesitant about is that we didn't warn people we were going to remove Also, should probably update docs before merging. |
What do we want to do with the I'm fine with deprecating |
I think we should keep it. You can go from LD to string with createHref or createPath, but not back? Since we seem to prefer LDs, that seems a bit backwards. |
The point of Maybe we should be unconditionally calling |
Okay, sorry, I think we're actually not ready for 2.x yet... I totally forgot about I think we should update This way users will actually not be broken, and they'll have the full set of deprecations. |
Users shouldn't ever actually need to use Server-side match(req.url, routes, ...) That's the beautiful thing about us being able to accept either a path or an object as a "location descriptor". You can give us a plain URL if that's all you have. In a lot of ways it's actually simpler. |
But how does |
Nope, I figured out how to do it without using any private APIs, and without some of the hacks that I attempted on the way: |
Per this discussion on remix-run/react-router#2680, we're still going to have to update We can and should drop the non-instance-bound |
I can try to put together a PR for createLocation later today or maybe tomorrow. At this point, until we update React Router, nobody will be able to use history v2 anyway, so there's not much immediate benefit from releasing right now. |
The only real immediate benefit to me is that I get to cross something off my TODO list. |
That's a pretty good benefit (: This sounds a little byzantine, but what do you think of releasing a 1.16.0 with the deprecation warnings removed (maybe after we fix createLocation)? I'm a little uncomfortable that all the code we've pushed since 1.13.1 isn't getting used (even through the backward compat shims). It means that we aren't getting e.g. bug reports, so if there are problems, we won't know until (much) later. I'm thinking something like:
It sounds weird written out like this, but it means that we can start exercising the new/modified code paths, and get more confidence around the new code working, which means we have more time to fix bugs as they come up. |
ok, let's do it. |
👍 |
} | ||
|
||
const search = searchBase + (searchBase ? '&' : '?') + queryString | ||
const search = '?' + queryString |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 on ripping out my confusing mess here.
I noticed this diverged quite a bit from master. Doing a rebase now to get everything back in line. Edit: Just because I'm paranoid, I left the old version on my fork. |
Also, update createLocation signature and remove it from top-level exports. Closes #172
BTW, this looks all good to me too. |
Instead of removing deprecated code in 2.0, we'll remove it in 3.0. |
I believe this branch contains all the modifications we need to release v2. @rackt/routing please review in case I missed something.