Render JSX/Hyperscript to HTML strings, without VDOM ๐
Repo developit/vhtml, read from GitHub 1 d ago. developit has not joined Take My Repo.
classname and htmlFor props (#5, thanks @nathancahill)dangerouslySetInnerHTML (#12, thanks @pl12133)const Box = ({ title, children }) => ( <div class="box"> <h4>{title}</h4> {children} </div> ); console.log( <div> <Box title="foo"> Hello, I am <strong>foo</strong>. </Box> <Box title="bar"> Hi! I am <strong>bar</strong>! </Box> </div> );
This logs:
<div> <div class="box"> <h4>foo</h4> Hello, I am <strong>foo</strong>. </div> <div class="box"> <h4>bar</h4> Hi! I am <strong>bar</strong>! </div> </div>