diff --git a/src/core.ts b/src/core.ts index af9c500..3f4818c 100644 --- a/src/core.ts +++ b/src/core.ts @@ -9,7 +9,7 @@ import { create, Environment, root } from './environment'; import Message, { MessageConstructor } from './message'; import ExecContext from './runtime/exec_context'; import StateManager from './runtime/state_manager'; -import { mapResult, reduceUpdater } from './util'; +import { log, mapResult, reduceUpdater } from './util'; import ViewWrapper from './view_wrapper'; /** @@ -182,7 +182,7 @@ export const container: (def: ContainerDef) => Container = withEnvironm */ export const isolate = (ctr: Container, opts: any = {}): IsolatedContainer => { const stateManager = opts.stateManager && always(opts.stateManager) || (() => new StateManager()); - const env = create({ dispatcher: nthArg(2), effects: new Map(), log: () => {}, stateManager }); + const env = create({ dispatcher: nthArg(2), effects: new Map(), log, stateManager }); const container = assign(mapDef(ctr.identity()), { accepts: always(true) }) as Container; const parent: any = opts.relay ? { relay: always(opts.relay) } : null; diff --git a/src/view_wrapper.tsx b/src/view_wrapper.tsx index 2007bb6..2b6f434 100644 --- a/src/view_wrapper.tsx +++ b/src/view_wrapper.tsx @@ -94,7 +94,7 @@ export default class ViewWrapper extends React.Component, this.execContext.destroy(); } - public unstable_handleError(e) { + public componentDidCatch(e) { // tslint:disable-next-line:no-console console.error('Failed to compile React component\n', e); this.setState({ componentError: e });