How to get window URL using ReactJs ?
Apr 20, 2020
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
- How to Reactive Forms with Validation in Angular 18?
- Reactjs Props Example With Function and Class Components
- React Color Picker Example With Change Event
- How to Hide and Show Multiple Div in React ?
- React js File Upload Example With Axios
- How to Resize, Crop, Compress Images Before Uploading In ReactJS?
- How to Send Data From React to Node JS Express?
- Reactjs String Replace Example