New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mobx-mvvm

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx-mvvm - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

declarations/interfaces/IComponentProps.d.ts

4

declarations/createComponent.d.ts
import * as React from 'react';
import { IViewProps, IViewModel, IComponentDefinition } from './interfaces/index';
export declare function createComponent<TComponentProps>(definition: IComponentDefinition): (ViewModel: any) => React.ComponentClass<TComponentProps & IViewProps<IViewModel>>;
import { IComponentProps, IViewModel, IComponentDefinition } from './interfaces/index';
export declare function createComponent<TComponentProps>(definition: IComponentDefinition): (ViewModel: any) => React.ComponentClass<TComponentProps & IComponentProps<IViewModel>>;

@@ -1,2 +0,2 @@

import { IComponentState, IViewProps, IViewModel } from './interfaces/index';
export declare function createModel(state: IComponentState, props: IViewProps<IViewModel>, ctx: any, ViewModel: any): IComponentState;
import { IComponentState, IComponentProps, IViewModel } from './interfaces/index';
export declare function createModel(state: IComponentState, props: IComponentProps<IViewModel>, ctx: any, ViewModel: any): IComponentState;

@@ -10,1 +10,2 @@ export * from './IComponentContext';

export * from './ILinkDisposer';
export * from './IComponentProps';

@@ -57,2 +57,6 @@ "use strict";

if (this.linkDisposer) this.linkDisposer();
// dispose the model ref, if any
if (this.props.modelRef) {
this.props.modelRef(null);
}
// ...then dispose the model

@@ -59,0 +63,0 @@ disposeModel_1.disposeModel(this.state);

@@ -10,5 +10,10 @@ "use strict";

} : _ctx$resolver;
var _props$modelRef = props.modelRef;
var modelRef = _props$modelRef === undefined ? function () {
return true;
} : _props$modelRef;
// if model is passed from props and is new, set it
if (props.model && state.model !== props.model) {
modelRef(props.model);
disposeModel_1.disposeModel(state);

@@ -19,3 +24,5 @@ return { model: props.model, shouldDispose: false };

if (!state.model) {
return { model: resolver(ViewModel), shouldDispose: true };
var model = resolver(ViewModel);
modelRef(model);
return { model: model, shouldDispose: true };
}

@@ -22,0 +29,0 @@ // nothing done, untouched!

{
"name": "mobx-mvvm",
"version": "1.1.1",
"version": "1.1.2",
"description": "MVVM solution based on React and MobX",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc