How to use the styletron-legacy.constants function in styletron-legacy

To help you get started, we’ve selected a few styletron-legacy 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 styletron / styletron / packages / demos / react-demo-compat / src / server.js View on Github external
function generateHydrationScriptSrc(keys) {
  var sanitizedKeys = safeString(JSON.stringify(keys));
  return [
    ';try{',
      '(function(){',
        'window["', StyletronLegacy.constants.HYDRATE_KEY, '"]=', sanitizedKeys, ';',
      '})();',
    '}catch(e){};',
  ].join('');
}

styletron-legacy

Legacy package for 1.x styletron

MIT
Latest version published 7 years ago

Package Health Score

53 / 100
Full package analysis

Similar packages