Socket
Socket
Sign inDemoInstall

mobx-angular

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx-angular - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

<a name="2.0.2"></a>
# 2.0.2 (2018-1-18)
* Not collapsing log in debug
<a name="2.0.1"></a>

@@ -2,0 +6,0 @@ # 2.0.1 (2017-12-05)

2

package.json
{
"name": "mobx-angular",
"version": "2.0.1",
"version": "2.0.2",
"description": "Angular connector to MobX (2 and above)",

@@ -5,0 +5,0 @@ "jsnext:main": "dist/mobx-angular.js",

@@ -58,14 +58,9 @@ [![Build Status](https://travis-ci.org/mobxjs/mobx-angular.svg?branch=master)](https://travis-ci.org/mobxjs/mobx-angular)

## dontDetach
If you rather not detach your view from Change Detection - you can pass a config object to mobxAutorun:
```
<ng-container *mobxAutorun="{ dontDetach: true }">
...
</ng-container>
```
## dontDetach (and Upgrading from mobx-angular 1.X to 2.X)
Notice that in 2.X the *default* behaviour of *mobxAutorun is to detach from Change Detection.
But notice that this misses the purpose of using *mobxAutorun for better performance.
If you need something outside of the store you have 2 options without disabling detach:
If things stop working you have 3 options:
- Define local component properties as observables or computed values
- Surround with *mobxAutorun only the parts that actually use observable / computed values from the store
- Disabling detach by specifying: `*mobxAutorun="{ dontDetach: true }">`. To retain good performance you can use OnPush CD strategy on the component

@@ -129,2 +124,6 @@ ## autorunSync

## AoT
Some people complained about AoT when using mobx decorators inside components. In case you do that - we export a proxy to the decorators from mobx-angular, which should be AoT compatible, e.g. `import { observable, computed } from 'mobx-angular'`
The only thing you can't do when importing from mobx-angular is using the modifiers, such as `@observable.ref`.
## Examples

@@ -131,0 +130,0 @@ See the `example` folder, specifically these files:

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