File tree Expand file tree Collapse file tree 4 files changed +6
-1
lines changed
Expand file tree Collapse file tree 4 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ export const createConnect = <A extends Overmind<any>>(overmind: A) => () => {
3131 this . overmind = {
3232 state : this . __tree . state ,
3333 actions : overmind . actions ,
34+ addMutationListener : overmind . addMutationListener ,
3435 }
3536 this . __shouldUpdatePaths = false
3637 this . __componentInstanceId = componentInstanceId ++
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ export const createHook = <A extends Overmind<Configuration>>(
109109 return {
110110 state : tree . state ,
111111 actions : overmind . actions ,
112+ addMutationListener : overmind . addMutationListener ,
112113 }
113114 }
114115}
@@ -180,6 +181,7 @@ export const createConnect = <A extends Overmind<Configuration>>(
180181 overmind : {
181182 state : this . tree . state ,
182183 actions : overmind . actions ,
184+ addMutationListener : overmind . addMutationListener ,
183185 onUpdate : this . onUpdate ,
184186 tree : this . tree ,
185187 } ,
@@ -193,6 +195,7 @@ export const createConnect = <A extends Overmind<Configuration>>(
193195 overmind : {
194196 state : this . tree . state ,
195197 actions : overmind . actions ,
198+ addMutationListener : overmind . addMutationListener ,
196199 } ,
197200 } as any )
198201 }
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ export const createConnect = <A extends Overmind<any>>(overmind: A) => <
5050 this . overmind = {
5151 state : this . __tree . state ,
5252 actions : overmind . actions ,
53+ addMutationListener : overmind . addMutationListener ,
5354 }
5455 this . __tree . track ( this . __onUpdate )
5556 beforeMount && beforeMount . call ( this )
Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ export class Overmind<Config extends Configuration> implements Configuration {
436436 getMutationTree ( ) {
437437 return this . proxyStateTree . getMutationTree ( )
438438 }
439- addMutationListener ( cb ) {
439+ addMutationListener = ( cb ) => {
440440 return this . proxyStateTree . onMutation ( cb )
441441 }
442442}
You can’t perform that action at this time.
0 commit comments