currentURL
Returns the current URL.
- Use
Window.location.hrefto get the current URL.
const currentURL = () => window.location.href;currentURL(); // 'https://www.google.com/'
Returns the current URL.
Window.location.href to get the current URL.const currentURL = () => window.location.href;currentURL(); // 'https://www.google.com/'