-1
rated 0 times
[
0]
[
1]
/ answers: 1 / hits: 31729
/ 8 Years ago, tue, june 14, 2016, 12:00:00
I can parse are HTTP response of one of the intial calls and save that in the state but there must be another way to get the URL?
I am using the npm 'rest' library and want to specify a different port but I do not know the path on which machine the server will be installed so I need the server's url.
Solution
window.location.hostname
More From » reactjs