04-Apr-2023
.
Admin
Hello Dev,
Many times we need website url. so how to get window url in react. react get url domain. react js get url path. if you want to get react js current browser url then it's simple.
Get Path With Domain
window.location.href
Get Path Without Domain
window.location.pathname
I hope it can help you...
#React.js