- Implement the basic conversion logic which can convert react elements written in JSX into PURE String
- Add option
useFuncContent
, toggle whether display the function content of only its name-
true
: display function content -
false
: display only function name
-
- Support using it as a normal REACT Component
npm install react-elements-to-string --save
import ReactElementToString from 'react-elements-to-string'
// In render
<ReactElementObjectToString reactElements={<div>hello world</div>} useFuncContent={false} />
Lisence @MIT
Copyright to @2012-2017 Staydan.com