1.https://www.yuque.com/ant-design/course/wybhm9
2.• 组件的概念
• jsx语法
• 必须闭合
• 顶层只能有一个标签
• HTML 原生标签使用小写,自定义的组件标签首字母大写
• 允许js与jsx混写,{}进入js上下文
• 组件定义
• 继承React.Component基类,重写render方法
• 标签属性传值:this.props
• 标签内容传值:this.props.children
• 组件内部状态:this.state
• 组件生命周期
• componentDidMount:组件挂载后自动调用
• componentWillUnmount:组件卸载前自动调用
• componentDidUpdate:UI 每次更新后调用
react config/config.js
config.js默认不写路径,则显示src/pages/xxx.js
routes:[{
component:’…/xxx’ //选择文件夹
}]