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

react-input-message

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-input-message - npm Package Compare versions

Comparing version 0.12.1 to 0.12.2

28

connectToMessageContainer.js

@@ -67,6 +67,6 @@ 'use strict';

if (container) {
this.unsubscribe = container.subscribe(function (messages) {
messages = mapMessages(messages, resolveNames, _this2.props, container);
this.unsubscribe = container.subscribe(function (allMessages) {
var messages = mapMessages(allMessages, resolveNames, _this2.props, _this2.context.messageContainer);
_this2.setState({ messages: messages });
_this2.setState({ messages: messages, allMessages: allMessages });
});

@@ -77,7 +77,16 @@ }

MessageListener.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {
var _this3 = this;
if (mapMessages && mapMessages.length >= 2) {
var container = nextContext.messageContainer;
this.setState({
messages: mapMessages(this.state.messages, resolveNames, nextProps, container)
});
(function () {
var container = nextContext.messageContainer;
// callback style because the listener may have been called before
// and not had a chance to flush it's changes yet
_this3.setState(function (_ref) {
var allMessages = _ref.allMessages;
return {
messages: mapMessages(allMessages, resolveNames, nextProps, container)
};
});
})();
}

@@ -91,3 +100,6 @@ };

MessageListener.prototype.render = function render() {
return _react2.default.createElement(Component, _extends({}, this.props, this.state));
var messages = this.state.messages;
return _react2.default.createElement(Component, _extends({}, this.props, { messages: messages }));
};

@@ -94,0 +106,0 @@

{
"name": "react-input-message",
"description": "unopinionated form input annotation",
"version": "0.12.1",
"version": "0.12.2",
"repository": {

@@ -6,0 +6,0 @@ "url": "git://github.com/jquense/react-input-message.git"

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