How to change localhost to ip address in react js?
June 19, 2022Hi Friends 👋,
Welcome To aGuideHub! ❤️
Today, I am going to show you. How to change localhost to ip address in react js with code example.
To change localhost to IP address, your IP Address in your browser with in a code number to change localhost to IP address.
Here we will go to the cmd and write ipconfig
then press the enter button, and open the ipv4 address number.
then copy the number and open the browser paste the number. Finally, pretend you change the localhost id address.
In the below image, you can see the example.
Let’s look at the following example to understand how it basically works:
APP.js
import React, { useState } from 'react';
import "./App.css"
const App = () => {
return (
<div>
<h1>aGuidehub</h1>
<h1 style={{ fontSize: 50 }}>aGuidehub</h1>
</div>
)
}
export default App;
Check the output of the above code example.
All the best 👍