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

ctx-connect

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ctx-connect - npm Package Compare versions

Comparing version 2.0.4 to 2.1.0

13

ctx-connect.js

@@ -10,6 +10,11 @@ (function (root, factory) {

}(this, function (React, R, Reflux) {
return function (storeName, stateKeyName) {
return function (storeName, stateKeyName, getter) {
if (!stateKeyName) {
stateKeyName = storeName;
}
if (!getter) {
getter = function (store) {
return store.getInitialState();
};
}
return R.merge(Reflux.ListenerMethods, {

@@ -21,3 +26,4 @@ contextTypes: {

var state = {};
state[stateKeyName] = this.context.stores[storeName].getInitialState();
state[stateKeyName] = getter.call(this,
this.context.stores[storeName]);
return state;

@@ -29,3 +35,4 @@ },

var state = {};
state[stateKeyName] = v;
state[stateKeyName] = getter.call(this,
this.context.stores[storeName]);
this.setState(state);

@@ -32,0 +39,0 @@ }.bind(this));

{
"name": "ctx-connect",
"version": "2.0.4",
"version": "2.1.0",
"description": "Mixin for React to connect Reflux store from context",

@@ -5,0 +5,0 @@ "main": "ctx-connect.js",

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