React 深度探索

React16 新增了 Fragment, Suspense, memo 等新特性

Fragment 的语法糖 <>, 若使用 Fragment, 我更喜欢

1
2
3
import React, { Fragment } from 'react';

<Frament></Frament>

因为使用 React.Fragment 补全时候,根据 emmet 语法补全,会变成类

更新中…