Skip to content

Commit

Permalink
Update CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
A-gambit committed Nov 28, 2016
1 parent c3ed90e commit 8291163
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A deprecation message will now be printed if creating computed properties while relying on automatical inferrence of argumentless functions as computed values. In other words, when using `observable` or `extendObservable` in the following manner:

```
```js
const x = observable({
computedProp: function() {
return someComputation
Expand All @@ -19,7 +19,7 @@ x.computedProp()

Instead, to create a computed property, use:

```
```js
observable({
get computedProp() {
return someComputation
Expand All @@ -29,7 +29,7 @@ observable({

or alternatively:

```
```js
observable({
computedProp: computed(function() {
return someComputation
Expand All @@ -45,7 +45,7 @@ An observable _reference_ to the function will be made and the function itself w
See for more details [#532](https://github.com/mobxjs/mobx/issues/532)

N.B. If you want to introduce actions on an observable that modify it's state, using `action` is still the recommended approach:
```
```js
observable({
counter: 0,
increment: action(function() {
Expand Down Expand Up @@ -88,6 +88,20 @@ If you already adhered to this rule, this change won't impact you.

See [#649](https://github.com/mobxjs/mobx/issues/649)

### Flow-Types Support 🎉🎉🎉

Add flow types for methods and interfaces of observable variables:
```js
const observableValue: IObservableValue<number> = observable(1)
const observableArray: IObservableArray<number> = observable([1,2,3])

const sum: IComputedValue<number> = computed(() => {
return observableArray.reduce((a: number, b: number): number => a + b, 0)
})
```

See [#640](https://github.com/mobxjs/mobx/issues/640)

### Other changes

* Fixed #603: exceptions in transaction breaks future reactions
Expand Down

0 comments on commit 8291163

Please sign in to comment.