Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
!(process && process.title && process.title.includes('node'))
) {
if (hotReloadingCache[name]) {
return hotReloadingCache[name].reconfigure(configuration)
} else {
hotReloadingCache[name] = this
}
}
/*
Set up an eventHub to trigger information from derived, computed and reactions
*/
const eventHub =
mode.mode === MODE_SSR
? new MockedEventEmitter()
: new EventEmitter()
/*
Create the proxy state tree instance with the state and a wrapper to expose
the eventHub
*/
const proxyStateTree = this.createProxyStateTree(
configuration,
eventHub,
mode.mode === MODE_SSR ? false : process.env.NODE_ENV === 'development'
)
this.originalConfiguration = configuration
this.state = proxyStateTree.state
this.effects = configuration.effects || {}
this.proxyStateTree = proxyStateTree
this.eventHub = eventHub as EventEmitter