Step 1
Let's create a React app:
npx create-react-app quicknote-app --use-npm
Delete the default files except for index.html
in the public
folder. Moreover, remove everything except for App.js
and index.js
from the src
folder. Finally, simplify the remaining files as follows.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>React App</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
index.js
import ReactDOM from "react-dom";
import App from "./App";
ReactDOM.render(
<App />,
document.getElementById("root")
);
App.js
function App() {
return <div>Hello React!</div>;
}
export default App;