-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
[DO NOT MERGE] Use lazily-initialized shims for history singletons #3388
Conversation
This is probably more correct: remix-run/history#283 |
Current coverage is 95.01%@@ master #3388 diff @@
==========================================
Files 30 30
Lines 921 921
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 875 875
Misses 46 46
Partials 0 0
|
Erm. wat |
ALL HAIL THE GIANT GREEN CIRCLE OF COVERAGE! |
'createPath', | ||
'createHref', | ||
'createLocation' | ||
] |
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.
wat.
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.
Really don't like this. I get that we're tied to the API internally anyways, but this seems like an antipattern to me. I would kill for a method_missing
equivalent in JS, but that's not going to happen until Proxy is more prevalent.
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.
Poor man's Proxy
.
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.
This isn't the right way to go about it anyway, the history PR is much better.
history 2.1.1 is out, so this shouldn't be needed. |
Maybe?
It'd address e.g. #3387.
Going to make a separate PR to history that makes the base href check lazy, which is probably more correct.