UNPKG
@yncoder/element-react
Version:
latest (1.4.34-patch.6)
1.4.34
1.4.34-patch.6
1.4.34-patch.5
1.4.34-patch.4
1.4.34-patch.3
1.4.34-patch.2
1.4.34-patch.1
1.4.24
1.4.23
1.4.22
1.4.21
1.4.13
Element UI for React
elemefe.github.io/element-react/
gezher/element-react
@yncoder/element-react
/
libs
/
utils
/
react.js
9 lines
(6 loc)
•
178 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
import
React
from
'react'
function
firstChild
(
props
) {
const
childrenArray =
React
.
Children
.
toArray
(props.
children
);
return
childrenArray[
0
] ||
null
; }
export
{firstChild}