|
|
|
|
|
by wereHamster
3118 days ago
|
|
Because the value may change. If 'currentUrl' was a constant (eg. `const currentUrl = window.location.href`) it would capture the href at the start of the application, even though it might change later on (history API, pushstate etc). |
|