React内置便捷函数、生命周期、路由

React内置便捷函数 React.children.map(children, function[(thisArg)]); React.children.forEach(children, function[(thisArg)]); 优势:内置函数能够解决children为单个或者没有的状况下不是数组类型没法遍历,单个的children为object对象,若是没有的话就是undefined。ja
相关文章
相关标签/搜索