@mizchi/react-ssr-mounter

0.1.0 • Public • Published

React Server Side Rendering Mounter

npm install @mizchi/react-ssr-mounter --save

Usage

Server Side HTML

<div class='wrapper'>
  <div data-react-class='T.Hello' data-react-props='{}'></div>
</div>

JavaScript

window.T = {}
T.Hello = React.createClass({
  render(){return <div><h1>hello</h1></div>;}
});

let {initComponents} = require('@mizchi/react-ssr-mounter');
window.addEventListener("load", () => {
  var components = initComponents();
});

LICENSE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @mizchi/react-ssr-mounter

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • mizchi