1.0.3 • Published 6 years ago

jsx-inner-text v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

jsx-inner-text

Returns the innerText of a React JSX object, similar to the innerText property of DOM elements.

Example

CommonJS

const innerText = require('jsx-inner-text');
innerText(<div>Hello <strong>world</strong>!</div>) === 'Hello world!'

ES6

import innerText from 'jsx-inner-text';
innerText(<div>Hello <strong>world</strong>!</div>) === 'Hello world!'