书接上一回
现在需要在项目文件夹内建一个react app
npx create-react-app frontend
然后cd到frontend的文件夹内,运行持续会看到react默认的初始化页面。
cd frontend
npm start
需要用到bootstrap和reactstrap
npm install bootstrap@4.6.0 reactstrap@8.9.0 --legacy-peer-deps
打开 index.js 加入css
import 'bootstrap/dist/css/bootstrap.css';
App.js内代码段为:
import React, { Component } from "react";
const todoItems = [
{
id: 1,
title: "Go to Market",
description: "Buy ingredients to prepare dinner",
completed: true,
},
{
id: 2,
title: "Study",
descrip