Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fela-bindings

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-bindings - npm Package Compare versions

Comparing version 2.3.1 to 3.0.0

17

es/ProviderFactory.js

@@ -16,2 +16,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function hasServerRenderedStyle() {
return window.document.querySelectorAll('[data-fela-type]').length > 0;
}
export default function ProviderFactory(BaseComponent, renderChildren, statics) {

@@ -27,3 +31,7 @@ var Provider = function (_BaseComponent) {

if (props.rehydrate && hasDOM(props.renderer)) {
rehydrate(props.renderer);
if (hasServerRenderedStyle()) {
rehydrate(props.renderer);
} else {
render(props.renderer);
}
}

@@ -34,9 +42,2 @@ return _this;

_createClass(Provider, [{
key: 'componentWillMount',
value: function componentWillMount() {
if (this.props.renderToDOM && hasDOM(this.props.renderer)) {
render(this.props.renderer);
}
}
}, {
key: 'getChildContext',

@@ -43,0 +44,0 @@ value: function getChildContext() {

@@ -29,2 +29,6 @@ 'use strict';

function hasServerRenderedStyle() {
return window.document.querySelectorAll('[data-fela-type]').length > 0;
}
function ProviderFactory(BaseComponent, renderChildren, statics) {

@@ -40,3 +44,7 @@ var Provider = function (_BaseComponent) {

if (props.rehydrate && hasDOM(props.renderer)) {
(0, _felaDom.rehydrate)(props.renderer);
if (hasServerRenderedStyle()) {
(0, _felaDom.rehydrate)(props.renderer);
} else {
(0, _felaDom.render)(props.renderer);
}
}

@@ -47,9 +55,2 @@ return _this;

_createClass(Provider, [{
key: 'componentWillMount',
value: function componentWillMount() {
if (this.props.renderToDOM && hasDOM(this.props.renderer)) {
(0, _felaDom.render)(this.props.renderer);
}
}
}, {
key: 'getChildContext',

@@ -56,0 +57,0 @@ value: function getChildContext() {

{
"name": "fela-bindings",
"version": "2.3.1",
"version": "3.0.0",
"description": "Abstract binding factories for Fela",

@@ -26,4 +26,4 @@ "main": "lib/index.js",

"fast-loops": "^1.0.0",
"fela-dom": "^7.0.9",
"fela-tools": "^5.1.7",
"fela-dom": "^8.0.0",
"fela-tools": "^5.2.0",
"react-addons-shallow-compare": "^15.6.2",

@@ -33,5 +33,5 @@ "shallow-equal": "^1.0.0"

"devDependencies": {
"fela": "^6.1.9",
"fela-monolithic": "^5.0.23"
"fela": "^6.2.0",
"fela-monolithic": "^5.0.24"
}
}
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