null || '' ??
romazhan opened this issue · 6 comments
mobx-router/src/start-router.ts
Line 44 in d8b65c6
@polak228 Can you give some more info on this issue? Are you experiencing problems with this line?
Why write null || "?
Ah that's indeed a bit silly 🙂
So it's always ''
Is there a better value than empty string for this argument?
Write just '', it will work faster by 0.0001 seconds
Yes, according to the docs https://developer.mozilla.org/en-US/docs/Web/API/History/pushState it should be empty string as this value is never used and exists only for historical reasons.
Feel free to submit a PR.
Still not sure how you stumbled on this line though but that's none of my business :)
It's just that sometimes I like to dig into someone else's code