-
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 9d2eba9
Showing
2 changed files
with
39 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,13 @@ | ||
// Based on https://github.com/facebook/flux/issues/351#issuecomment-243175376 | ||
import {Container} from 'flux/utils'; | ||
|
||
export default 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 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.0", | ||
"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" | ||
} |