Like DOM API's `Node.textContent` and it works in React Element
npm install react-addons-text-content  
Like DOM API's Node.textContent and it works in React Element
``sh`
$ npm install --save react-addons-text-content
`javascript`
import textContent from 'react-addons-text-content'
render() {
const {children} = this.props
const text = textContent(children)
return (...)
}
`javascriptHello World
test('should be got text ', assert => {
const Com =
Hello
World
assert.is(textContent(Com), Hello World)`
})
`javascriptHello Worldab
test('array children', assert => {
const Com = (
Hello
World
{
['a', b
]
}
)
assert.is(textContent(Com), )`
})
`javascript
test('array component', assert => {
const Com = (
[
a
, 'b', 'c',
x
y
]
)
assert.is(textContent(Com), abcxy)``
})