-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix is based on facebookarchive/flux#351 (comment)
- Loading branch information
0 parents
commit 6179a1d
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |