Skip to content

Commit

Permalink
Docs for #2079
Browse files Browse the repository at this point in the history
derivationRequiresObservable & observablesRequiresReaction
  • Loading branch information
Bnaya committed Aug 19, 2019
1 parent f776568 commit d19c9a4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/refguide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,22 @@ Use this if you want to check whether you are using computed properties without
configure({ computedRequiresReaction: true });
```

#### `observablesRequiresReaction: boolean`
Warns about any unobserved observable access.
Use this if you want to check whether you are using observables without a reactive context (eg react component without observer wrapping).

```javascript
configure({ observablesRequiresReaction: true });
```

#### `derivationRequiresObservable: boolean`
Warns when a derivation (reaction, autorun, observer react component) is created without any observable access.
Use this to check whether you are unneededly wrapping react components with `observer`, or to find possible related bugs.

```javascript
configure({ derivationRequiresObservable: true });
```

#### `computedConfigurable: boolean`
Allows overwriting computed values. This is useful for testing purposes *only*. Don't enable this
on production as it can cause memory-leaks.
Expand Down

0 comments on commit d19c9a4

Please sign in to comment.