Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Nav Patel authored and patelnav committed Jul 5, 2017
0 parents commit 6179a1d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Based on https://github.com/facebook/flux/issues/351#issuecomment-243175376

const flux_utils = require('flux/utils')

module.exports = function FluxContainerCreate(containerClass) {
const tmp = containerClass;
containerClass = function(...args) {
return new tmp(...args);
};
containerClass.prototype = tmp.prototype;
containerClass.getStores = tmp.getStores;
containerClass.calculateState = tmp.calculateState;
return flux_utils.Container.create(containerClass);
}
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "flux-container-create",
"version": "1.0.1",
"description": "Workaround for https://github.com/facebook/flux/issues/351, based on lazy8's code'",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Nav Patel <[email protected]>",
"license": "ISC",
"dependencies": {
"flux": "^3.1.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/patelnav/flux-container-create.git"
},
"keywords": [
"react",
"flux"
],
"bugs": {
"url": "https://github.com/patelnav/flux-container-create/issues"
},
"homepage": "https://github.com/patelnav/flux-container-create#readme"
}

0 comments on commit 6179a1d

Please sign in to comment.