🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

fluxible

Package Overview
Dependencies
Maintainers
5
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluxible - npm Package Compare versions

Comparing version

to
0.2.6

2

docs/fluxible-context.md

@@ -56,2 +56,4 @@ # FluxibleContext

Note: You may provide an app level `componentActionHandler` function when instantiating Fluxible. This allows you to catch errors (at a high level) spawning from components firing actions.
This context interface should be passed in to your top level React component and then sent down to children as needed. These components will now have access to listen to store instances, execute actions, and access any methods added to the component context by plugins.

@@ -58,0 +60,0 @@

@@ -11,2 +11,3 @@ # Fluxible

* `options.component` (optional): Stores your top level React component for access using getComponent()
* `options.componentActionHandler` (optional): App level component action handler.

@@ -13,0 +14,0 @@ ## createContext(contextOptions)

@@ -36,2 +36,3 @@ /**

this._component = options.component || options.appComponent;
this._componentActionHandler = options.componentActionHandler || this._defaultComponentActionHandler;
this._plugins = [];

@@ -73,2 +74,15 @@

/**
* The default component action handler
* @method defaultComponentActionHandler
* @param {Error} [err]
* @private
*/
Fluxible.prototype._defaultComponentActionHandler = function defaultComponentActionHandler(err) {
if (err) {
debug('Action returned error', err);
throw err;
}
};
/**
* Creates a new dispatcher instance using the application's dispatchr class. Used by

@@ -75,0 +89,0 @@ * FluxibleContext to create new dispatcher instance

11

lib/FluxibleContext.js

@@ -150,11 +150,6 @@ /**

getStore: this._dispatcher.getStore.bind(this._dispatcher),
// Disallows components from handling the callback for an action
// Prevents components from directly handling the callback for an action
executeAction: function componentExecuteAction(action, payload) {
self.executeAction(action, payload, function executeActionCallback(err) {
// @TODO provide a way to configure component action error handler
if (err) {
debug('Action returned error', err);
throw err;
}
});
var actionHandler = self._app._componentActionHandler;
self.executeAction(action, payload, actionHandler);
}

@@ -161,0 +156,0 @@ };

{
"name": "fluxible",
"version": "0.2.5",
"version": "0.2.6",
"description": "A pluggable container for isomorphic flux applications",

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

Sorry, the diff of this file is not supported yet