yarn add react react-dom
create src folder
mkdir src
create src/App.jsx
import React from "react";
function App() {
return <div>Hello World</div>;
}
export default App;
create src/index.jsx
import React from "react";
import { render } from "react-dom";
import App from "./App";
render(<App />, document.getElementById("root"));
create src/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Title</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
run command
yarn start
run command
yarn build