Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react conditional if localhost

if (location.hostname === "localhost" || location.hostname === "127.0.0.1")
    alert("It's a local server!");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #conditional #localhost
ADD COMMENT
Topic
Name
2+3 =