Skip to content

Commit

Permalink
update docs after review
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Oct 18, 2018
1 parent 1f1d5fe commit fed844e
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions projects/ngrx.io/content/guide/migration/v7.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,7 @@
# Migration guide v7
# V7 Update Guide

## @ngrx/store

### `select`

In NgRx 6.1 the `select` static function was marked as deprecated in favor of the `select` RxJS operator, in NgRx v7 this static function was dropped.

BEFORE:

```ts
import { Store } from '@ngrx/store');
import { selectUser } from '../reducers');

@Component({...})
export class AppComponent implements OnInit {
user$: Observable<User>;

constructor(private store: Store<AppState>) { }

ngOnInit() {
this.user$ = this.store.select(selectUser);
}
}
```

AFTER:

```ts
import { Store, select } from '@ngrx/store'); // import `select`
import { selectUser } from '../reducers');

@Component({...})
export class AppComponent implements OnInit {
user$: Observable<User>;

constructor(private store: Store<AppState>) { }

ngOnInit() {
this.user$ = this.store.pipe(select(selectUser)); // use the pipeable select operator
}
}
```

### `@ngrx/store/update-reducers` action

When multiple feature reducers are registered, a single action is dispatched instead of an action for each added feature reducer.
Expand Down Expand Up @@ -79,7 +39,7 @@ When adding/removing multiple features:

### `ofType`

In NgRx 6.1 the `ofType` static function was marked as deprecated in favor of the `ofType` RxJS operator, in NgRx v7 this static function was dropped.
In NgRx 6.1 the `ofType` function was marked as deprecated in favor of the `ofType` operator, in NgRx v7 this function was dropped.

BEFORE:

Expand Down Expand Up @@ -136,4 +96,4 @@ StoreRouterConnectingModule.forRoot(),

## @ngrx/store-devtools

The devtools is using the new `@ngrx/devtools/recompute-state` action to recompute its state instead of the `@ngrx/store/update-reducers` action.
The devtools is using the new `@ngrx/devtools/recompute` action to recompute its state instead of the `@ngrx/store/update-reducers` action.

0 comments on commit fed844e

Please sign in to comment.