diff --git a/Source/JavaScript/Applications.React.MVVM/MVVMContext.tsx b/Source/JavaScript/Applications.React.MVVM/MVVMContext.tsx index 587798ea..992c3036 100644 --- a/Source/JavaScript/Applications.React.MVVM/MVVMContext.tsx +++ b/Source/JavaScript/Applications.React.MVVM/MVVMContext.tsx @@ -8,22 +8,20 @@ import { MobxOptions } from './MobxOptions'; export interface MVVMProps { children?: JSX.Element | JSX.Element[]; - mobx: MobxOptions | undefined + mobx?: MobxOptions; } export const MVVMContext = React.createContext({}); export const MVVM = (props: MVVMProps) => { - - const options: MobxOptions = { ...{ enforceActions: 'never' }, ...props.mobx || {} }; + const options: MobxOptions = { + ...{ enforceActions: 'never' }, + ...(props.mobx || {}), + }; configureMobx(options); Bindings.initialize(); - return ( - - {props.children} - - ); -}; \ No newline at end of file + return {props.children}; +};