Socket
Socket
Sign inDemoInstall

@shopify/react-html

Package Overview
Dependencies
Maintainers
9
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/react-html - npm Package Compare versions

Comparing version 2.0.10 to 3.0.1

3

dist/HTML.d.ts

@@ -30,3 +30,4 @@ /// <reference types="react" />

};
hideForInitialLoad?: boolean;
}
export default function HTML({children, blockingScripts, scripts, styles, data, headData}: Props): JSX.Element;
export default function HTML({children, blockingScripts, scripts, styles, data, headData, hideForInitialLoad}: Props): JSX.Element;

@@ -27,3 +27,3 @@ "use strict";

function HTML(_a) {
var _b = _a.children, children = _b === void 0 ? '' : _b, _c = _a.blockingScripts, blockingScripts = _c === void 0 ? [] : _c, _d = _a.scripts, scripts = _d === void 0 ? [] : _d, _e = _a.styles, styles = _e === void 0 ? [] : _e, _f = _a.data, data = _f === void 0 ? {} : _f, _g = _a.headData, headData = _g === void 0 ? {} : _g;
var _b = _a.children, children = _b === void 0 ? '' : _b, _c = _a.blockingScripts, blockingScripts = _c === void 0 ? [] : _c, _d = _a.scripts, scripts = _d === void 0 ? [] : _d, _e = _a.styles, styles = _e === void 0 ? [] : _e, _f = _a.data, data = _f === void 0 ? {} : _f, _g = _a.headData, headData = _g === void 0 ? {} : _g, hideForInitialLoad = _a.hideForInitialLoad;
var markup = server_1.renderToString(children);

@@ -42,7 +42,5 @@ var helmet = react_helmet_1.default.renderStatic();

});
/* eslint-disable no-process-env, no-undefined */
var bodyStyles = process.env.NODE_ENV === 'development' && blockingScripts.length > 0
? { display: 'none' }
: undefined;
/* eslint-enable no-process-env, no-undefined */
/* eslint-disable no-undefined */
var bodyStyles = hideForInitialLoad ? { display: 'none' } : undefined;
/* eslint-enable no-undefined */
var headDataMarkup = Object.keys(headData).map(function (id) {

@@ -49,0 +47,0 @@ return React.createElement(react_serialize_1.Serializer, { key: id, id: id, data: headData[id] });

{
"name": "@shopify/react-html",
"version": "2.0.10",
"version": "3.0.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A component to render your react app with no static HTML.",

@@ -50,2 +50,3 @@ # `@shopify/react-html`

data?: {[id: string]: any};
hideForInitialLoad?: boolean;
}

@@ -80,2 +81,5 @@

**hideForInitialLoad**
Sets the body contents to be hidden for the initial render. Use this when injecting stylesheets dynamically in development in order to prevent a flash of unstyled content.
### Serializers

@@ -82,0 +86,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc