v16.2.0-fragment-support

1
2
3
4
5
6
7
8
9
10
11
12
13
14
const Fragment = React.Fragment;

<Fragment>
<ChildA />
<ChildB />
<ChildC />
</Fragment>

// This also works
<React.Fragment>
<ChildA />
<ChildB />
<ChildC />
</React.Fragment>

https://reactjs.org/blog/2017/11/28/react-v16.2.0-fragment-support.html

启发:

https://developer.mozilla.org/en-US/docs/Archive/Web/E4X/E4X_for_templating

坚持原创技术分享,您的支持将鼓励我继续创作!