一种实现批量渲染对象元素(元素为react组件)的方法
一种使用批量渲染 数组(元素为react组件)的方法
思为:可直接对象一个数组进行渲染输出,前提是,数组元素应为react组件
参考代码如下
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>React 实例</title>
<script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
<script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"