react-static-content

1.0.4 • Public • Published

React Static Content

rehydrate server rendered static content without the data

//server
ReactDOMServer.renderToString(
    <StaticRenderProvider server>
        <StaticContent renderID="big-table">
            <Table data={giantDataObject} />
        </StaticContent>
    </StaticRenderProvider>
);

//client
ReactDOM.rehydrate(
    <StaticRenderProvider>
        <StaticContent renderID="big-table">
            <Table data={null} />
        </StaticContent>
    </StaticRenderProvider>,
    document.getElementById('root'),
);

Readme

Keywords

none

Package Sidebar

Install

npm i react-static-content

Weekly Downloads

16

Version

1.0.4

License

ISC

Last publish

Collaborators

  • lazopm