npm install react-router-dompages folder in src folderHome.js 
rfce in Home.js

App.js

import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom';import Home from './pages/Home';npm start in server folder
rfce
App.js import CreatePost from './pages/CreatePost';<Route path="/createpost" exact component={CreatePost} />


<Link to="/createpost">Create A Post</Link> code.npm install formikimport { Formik, Form, Field, ErrorMessage } from 'formik';


code
/* CREATE POST PAGE CSS */
.createPostPage {
font-family: Arial, Helvetica, sans-serif;
width: 100vw;
height: 70vh;
display: flex;
justify-content: center;
align-items: center;
}
.formContainer {
display: flex;
flex-direction: column;
justify-content: center;
width: 500px;
height: auto;
padding: 20px;
border: 5px solid dodgerblue;
border-radius: 5px;
}
.formContainer #inputCreatePost {
height: 40px;
margin-top: 10px;
margin-bottom: 10px;
border: 2px solid grey;
border-radius: 5px;
padding-left: 10px;
font-size: 20px;
}
.formContainer button {
margin-top: 15px;
height: 40px;
border: none;
background-color: lightskyblue;
border-radius: 5px;
color: white;
}
.formContainer button:hover {
cursor: pointer;
background-color: dodgerblue;
}
span {
color: red;
}
npm install yup






import axios from 'axios'onSubmit function axios.post('http://localhost:3001/posts', data).then(response => {
console.log('it worked');
});

plus , what we wrote is added on HomePage

how about DB?



