一、html
import React, { Component } from 'react';
{ Component }是ES6里的解构赋值react
至关于this
import React from 'react'; const Component = React.Component
二、serviceWorkerspa
PWA有关code
三、Fragments 若是子节点多,能够包含在Fragments 里,并且审查元素的时候,不会显示htm
https://zh-hans.reactjs.org/docs/fragments.html#___gatsbyblog
四、react里的方法,this不是指向App实例,因此须要用bind进行绑定get
onChange={this.handleInputChange.bind(this)}
on绑定的方法,要用大写class