File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " delorean" ,
3- "version" : " 0.9.7 " ,
3+ "version" : " 0.9.8 " ,
44 "description" : " Flux Library" ,
55 "main" : " src/delorean.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 566566
567567 // ## Built-in React Mixin
568568 DeLorean . Flux . mixins = {
569+
570+ // This mixin adds the this.trigger method to the component
571+ // Components can then trigger actions in flux w/out watching stores and having their state
572+ trigger : {
573+
574+ componentWillMount : function ( ) {
575+ this . __dispatcher = __findDispatcher ( this ) ;
576+ } ,
577+
578+ trigger : function ( ) {
579+ this . __dispatcher . emit . apply ( this . __dispatcher , arguments ) ;
580+ }
581+
582+ } ,
583+
569584 // It should be inserted to the React components which
570585 // used in Flux.
571586 // Simply `mixin: [Flux.mixins.storeListener]` will work.
You can’t perform that action at this time.
0 commit comments