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

react-resolver

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-resolver - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

_book/.nvmrc

10

_book/CHANGELOG.md
# React Resolver Changelog
### v3.0.2 - (2016-06-30)
- Fix `@client()` not showing the loader.
+ <https://github.com/ericclemmons/react-resolver/pull/39>
### v3.0.1 - (2016-04-11)
- Add support for React v15
+ <https://github.com/ericclemmons/react-resolver/pull/112>
### v3.0.0 - (2016-03-01)

@@ -4,0 +14,0 @@

2

_book/package.json
{
"name": "react-resolver",
"version": "3.0.1",
"version": "3.0.2",
"description": "Async-rendering & data-fetching for universal React applications",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# React Resolver Changelog
### v3.0.2 - (2016-06-30)
- Fix `@client()` not showing the loader.
+ <https://github.com/ericclemmons/react-resolver/pull/39>
### v3.0.1 - (2016-04-11)
- Add support for React v15
+ <https://github.com/ericclemmons/react-resolver/pull/112>
### v3.0.0 - (2016-03-01)

@@ -4,0 +14,0 @@

@@ -7,2 +7,4 @@ "use strict";

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
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; }; })();

@@ -24,2 +26,6 @@

var _Resolver = require("./Resolver");
var _Resolver2 = _interopRequireDefault(_Resolver);
function client(Loader) {

@@ -34,2 +40,14 @@ return function clientDecorator(Component) {

enumerable: true
}, {
key: "childContextTypes",
value: {
resolver: _react2["default"].PropTypes.instanceOf(_Resolver2["default"])
},
enumerable: true
}, {
key: "contextTypes",
value: {
resolver: _react2["default"].PropTypes.instanceOf(_Resolver2["default"])
},
enumerable: true
}]);

@@ -42,3 +60,9 @@

this.state = { visible: process.env.NODE_ENV === "test" };
this.enqueue = this.enqueue.bind(this);
this.queue = [];
this.state = {
bypass: process.env.NODE_ENV === "test",
loaded: false,
server: true
};
}

@@ -49,12 +73,51 @@

value: function componentDidMount() {
this.setState({ visible: true });
this.setState({ server: false }, function () {
var _this = this;
Promise.all(this.queue).then(function () {
return _this.setState({ loaded: true });
});
});
}
}, {
key: "enqueue",
value: function enqueue(promise) {
this.queue.push(promise);
}
}, {
key: "render",
value: function render() {
if (!this.state.visible) {
return Loader ? _react2["default"].createElement(Loader, null) : null;
var _this2 = this;
var _state = this.state;
var bypass = _state.bypass;
var loaded = _state.loaded;
var server = _state.server;
var loader = Loader ? _react2["default"].createElement(Loader, null) : null;
if (server) {
return loader;
}
return _react2["default"].createElement(Component, this.props);
if (bypass || loaded) {
return _react2["default"].createElement(Component, this.props);
}
return _react2["default"].createElement(
"div",
null,
loader,
_react2["default"].createElement(
"div",
{ style: { display: "none" } },
_react2["default"].createElement(
_Resolver2["default"],
{ onResolve: this.enqueue },
function (resolved) {
return _react2["default"].createElement(Component, _extends({}, _this2.props, resolved));
}
)
)
);
}

@@ -61,0 +124,0 @@ }]);

{
"name": "react-resolver",
"version": "3.0.1",
"version": "3.0.2",
"description": "Async-rendering & data-fetching for universal React applications",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -17,6 +17,6 @@ ## Summary

+ [client](/docs/api/Client.md)
+ [context](/docs/api/Client.md)
+ [resolve](/docs/api/Client.md)
+ [Resolver](/docs/api/Client.md)
+ [context](/docs/api/Context.md)
+ [resolve](/docs/api/resolve.md)
+ [Resolver](/docs/api/Resolver.md)
- [Troubleshooting](/docs/Troubleshooting.md)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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