WC React & Node
WC React & Node
Synchronous:
Assynchronous:
React
React Components:
Home.js
const Home = () => {
return <h1>This is a Home page</h1>;
};
Blog.js
const Home = () => {
return <h1>This is a Home page</h1>;
};
Contact.js
const Contact = () => {
return <h1>Contact Me @ [email protected]</h1>;
};
Nopage.js
const NoPage = () => {
return <h1>404</h1>;
};
Index.js
import ReactDOM from "react-dom/client";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Layout from "./Layout";
import Home from "./Home";
import Blogs from "./Blogs";
import Contact from "./Contact";
import NoPage from "./NoPage";
Layout.js:
import { Outlet, Link } from "react-router-dom";