Skip to content

Commit dacbc71

Browse files
committed
docs(state): fix various typos
1 parent ef03173 commit dacbc71

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

libs/state/docs/concepts-and-best-practices.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Good:
2828
In a first step you want to setup the state interface. A property that should change the view of your component should find its place in the interface.
2929
View bindings and triggers, which in turn mutate your state, should be `Subjects`.
3030
In the best case, you keep your state _normalized_.
31-
_Derived state_ should be handled seperately.
31+
_Derived state_ should be handled separately.
3232

3333
**Example view interface**:
3434

@@ -54,7 +54,7 @@ interface MyView {
5454
@Component({
5555
selector: 'app-stateful-component',
5656
template: ` <div>{{ vm$ | async | json }}</div> `,
57-
changeDetection: Changedetection.OnPush,
57+
changeDetection: ChangeDetection.OnPush,
5858
providers: [RxState],
5959
})
6060
export class StatefulComponent implements MyView {

libs/state/docs/snippets/deriving-simple-state.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You will always (aka repetitive) want to ensure that:
1313
You will sometimes (aka situational) need:
1414

1515
- a subset of the state (derivations)
16-
- compose the state with other Observables or change the Observables behaviour
16+
- compose the state with other Observables or change the Observables behavior
1717

1818
If we take a simple state derivation and select the number of items in a list the above looks like this:
1919

@@ -31,12 +31,12 @@ const derivation$ = state$.pipe(
3131
filter((v) => v !== undefined),
3232
// Distinct same values derived from the state
3333
distinctUntilChanged(),
34-
// Reuse custom operations result for multiple subscribers and reemit the last calculated value.
34+
// Reuse custom operations result for multiple subscribers and re-emit the last calculated value.
3535
shareReplay({ bufferSize: 1, refCount: true })
3636
);
3737
```
3838

39-
Using the `stateful` operator gives you the advantage to insert custom logic to derive state without having to think about sharing or replaying. It will also apply `distinctUntilChanged` by default. But you can provide custom logic for distinct values aswell.
39+
Using the `stateful` operator gives you the advantage to insert custom logic to derive state without having to think about sharing or replaying. It will also apply `distinctUntilChanged` by default. But you can provide custom logic for distinct values as well.
4040

4141
```typescript
4242
import { Observable } from 'rxjs';

0 commit comments

Comments
 (0)