react-isomorphic-tools
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "react-isomorphic-tools", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Authorization, Fetcher, Preload. Tools for ServerSide rendering", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -43,5 +43,11 @@ 'use strict'; | ||
function Preload() { | ||
function Preload(props) { | ||
(0, _classCallCheck3.default)(this, Preload); | ||
return (0, _possibleConstructorReturn3.default)(this, (Preload.__proto__ || (0, _getPrototypeOf2.default)(Preload)).apply(this, arguments)); | ||
var _this = (0, _possibleConstructorReturn3.default)(this, (Preload.__proto__ || (0, _getPrototypeOf2.default)(Preload)).call(this, props)); | ||
_this.getDisplayName = function () { | ||
return props.location.pathname; | ||
}; | ||
return _this; | ||
} | ||
@@ -56,3 +62,3 @@ | ||
return Preload; | ||
}(_react2.default.Component), _class.displayName = 'Preload(' + undefined.props.location.pathname + ')', _class.preload = _preload, _temp; | ||
}(_react2.default.Component), _class.displayName = 'Preload(' + undefined.getDisplayName() + ')', _class.preload = _preload, _temp; | ||
}; | ||
@@ -59,0 +65,0 @@ }; |
@@ -5,3 +5,10 @@ import React from 'react' | ||
const preload = preload => Component => class Preload extends React.Component { | ||
static displayName = `Preload(${this.props.location.pathname})` | ||
constructor(props){ | ||
super(props); | ||
this.getDisplayName = () => { | ||
return props.location.pathname | ||
} | ||
} | ||
static displayName = `Preload(${this.getDisplayName()})` | ||
static preload = preload | ||
@@ -8,0 +15,0 @@ render(){ |
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
61295
1441