Doug Doug - 2 months ago 13
React JSX Question

Read the current full URL with React?

How do I get the full URL from within a ReactJS component?

I'm thinking it should be something like

this.props.location
but it is
undefined

Answer

window.location.href is what you're looking for.