tinper-bee-core/js/toArray.js

13 lines
277 B
JavaScript
Raw Normal View History

2019-02-26 11:18:33 +08:00
/**
* This source code is quoted from rc-util.
* homepage: https://github.com/react-component/util
*/
2016-12-15 16:43:55 +08:00
import React from 'react';
export default function toArray(children) {
const ret = [];
React.Children.forEach(children, (c) => {
ret.push(c);
});
return ret;
}