File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -335,15 +335,15 @@ export default class App<
335335 addMutationListener ( paths , cb ) {
336336 return this . proxyStateTree . addMutationListener ( paths , cb )
337337 }
338- createReactionFactory ( ) {
338+ createReactionFactory ( prefix : string ) {
339339 const reactions = [ ]
340340 const instance = this
341341 return {
342342 add ( name : string , stateCb : ( state : State ) => any , cb : Function ) {
343343 const reaction = new Reaction (
344344 instance . eventHub ,
345345 instance . proxyStateTree ,
346- 'view .' + name
346+ prefix + ' .' + name
347347 )
348348 reaction . create ( stateCb , cb )
349349
Original file line number Diff line number Diff line change @@ -118,7 +118,9 @@ export default class ReactApp<
118118 __mutationListener : any
119119 __componentId = componentId
120120 __componentInstanceId = componentInstanceId ++
121- __reactionFactory = instance . createReactionFactory ( )
121+ __reactionFactory = instance . createReactionFactory (
122+ Component . name || Component . displayName
123+ )
122124 componentWillUnmount ( ) {
123125 if ( this . __mutationListener ) {
124126 if ( instance . devtools ) {
You can’t perform that action at this time.
0 commit comments