diff --git a/programming/web/reactjs/reactjsBasicNotes.md b/programming/web/reactjs/reactjsBasicNotes.md index 74c44f4f02..9b9fd672ee 100755 --- a/programming/web/reactjs/reactjsBasicNotes.md +++ b/programming/web/reactjs/reactjsBasicNotes.md @@ -24,10 +24,15 @@ - [MVC模式](#mvc模式) - [Controller](#controller) - [Best Practice](#best-practice) + - [React 16 (New Features)](#react-16-new-features) + - [Context API](#context-api) + - [Error Boundary](#error-boundary) + - [`React.Fragment`/`Array Components`](#reactfragmentarray-components) - [Components/Plugins](#componentsplugins) - [Documents](#documents) - [Data](#data) - [Data to View](#data-to-view) + - [Chat](#chat) - [UI](#ui) - [Animation](#animation) - [Charts](#charts) @@ -204,6 +209,54 @@ handle(e) { - 推荐使用ES6 - npm的debug包,log组件渲染的每个步骤和动作 +## React 16 (New Features) + +### Context API + +### Error Boundary + +### `React.Fragment`/`Array Components` + +```js +class Items extends React.Component { + render() { + return ( + + + + + + ) + } +} + +class Fruit extends React.Component { + render() { + return ( + <> +
  • Apple
  • +
  • Orange
  • +
  • Blueberry
  • +
  • Cherry
  • + + ) + } +} + +class Frameworks extends React.Component { + render () { + return ( + [ +

    JavaScript:

    +
  • React
  • , +
  • Vuejs
  • , +
  • Angular
  • + ] + ) + } +} +``` + ## Components/Plugins - [**Starter Kit Collection**](http://andrewhfarmer.com/starter-project)