fela-bindings
Advanced tools
Comparing version 2.3.1 to 3.0.0
@@ -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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74899
+ Addedfela-dom@8.0.4(transitive)
- Removedcss-in-js-utils@2.0.1(transitive)
- Removedfela-dom@7.0.9(transitive)
Updatedfela-dom@^8.0.0
Updatedfela-tools@^5.2.0