共index.js、index.html、 TodoList.js这三个文件,
主要看TodoList.js中的Input标签的style样式双花括号{
{}}的写法,会在下方做全面的解释
运行效果:
index.js:
import React from 'react';
import ReactDOM, { unmountComponentAtNode } from 'react-dom'
import TodoList from './TodoList'
ReactDOM.render(<TodoList />,document.getElementById('root'))
index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>TodoList</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
TodoList.js:
import React, { Component } from
版权声明:本文为qq_37279880原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。