article

Friday, June 16, 2023

Convert Any Bootstrap Templates To React JS

Convert Any Bootstrap Templates To React JS

React JS
https://create-react-app.dev/

Create Project
C:\react-js>npx create-react-app my-app

Run
C:\react-js\my-app> npm start

C:\react-js\my-app\src\App.js
//C:\react-js\my-app\src\App.js
import React, {  } from "react";

import Header from "./components/Header";
import Home from "./components/Home";
import Footer from "./components/Footer";

function App() {
  return (
    <>
      <Header/>
      <Home/>
      <Footer/>
    </>
  );
}

export default App;
C:\react-js\my-app\src\components\Header.js
//C:\react-js\my-app\src\components\Header.js
import React, {  } from "react";

function Header() {
  return (
    <>
    <div>
    Header
    </div>

    </>
  );
}

export default Header;
C:\react-js\my-app\src\components\Home.js
//C:\react-js\my-app\src\components\Home.js
import React, {  } from "react";

function Home() {
  return (
    <>
    <div>
		Home
    </div>

    </>
  );
}

export default Home;
C:\react-js\my-app\src\components\Footer.js
//C:\react-js\my-app\src\components\Footer.js
import React, {  } from "react";

function Footer() {
  return (
    <>
    <div>
    Footer
    </div>

    </>
  );
}

export default Footer;
Run C:\react-j\my-app>npm start
http://localhost:3000/

Related Post