How to use the @uifabric/merge-styles/lib-commonjs/server.renderStatic function in @uifabric/merge-styles

To help you get started, we’ve selected a few @uifabric/merge-styles examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OfficeDev / office-ui-fabric-react / apps / server-rendered-app / server / index.js View on Github external
function renderIsomorphic() {
  const { html, css } = renderStatic(() => {
    return ReactDOMServer.renderToString(React.createElement(TodoApp, {}));
  }, 'server');

  return (
    `` +
    `` +
    `<title>Server side rendering test</title>` +
    `<style>${css}</style>` +
    `` +
    `` +
    `<div id="content">${html}</div>` +
    ReactMinScripts +
    AppScript +
    `` +
    ``
  );