Closed abacaj closed 9 years ago
fixed.
Hey @darcyadams, I'd like to indicate that this is occurring for me as well: Chrome 42.0.2311.152 and Windows 8.
Noticed it first in my local app, but happening on the JS Fiddle as well :/
The js fiddle in the current master docs should now work. The specific issue is that the stores are now singletons, so the return value from Flux.createStore is the store instance, no need for instantiation. This pattern is more 'fluxy'. If I missed a link in the docs to a bunk js fiddle, please point me to the doc with the bad link, and I will get it fixed. Thanks.
Okay cool. I'm guessing this is a recent change?
I'm looking at the ReactJS example:
http://jsfiddle.net/fkadev/a2ms7rcc/
Is there a way to coerce the Stores API to return a new instance anyway? I'm currently using a small interface to create
and get
store instances, as I'm building the stores for a block of components, and assuming that there can be multiple instances on a single page.
Edit: Sorry scrap this. Misinterpreted what you said. Cheers.
The 0.8.x release and earlier allows multiple instances of the same store, but we switched to the singleton pattern as the intent of flux is to only have a single store of each type. The idea being that any component can be wired up to any store from which it needs to draw data. The should never be a need for multiple instances of a store.
JsFiddle example presented on the website does not work, see below:
var store = new Store();
console error: Object is not a function