Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87cf838

Browse files
committed
docs(state): fix typo and minor grammatical errors
1 parent 1ec6857 commit 87cf838

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libs/state/docs/snippets/logic-comparison--increment-a-value.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ We have a component that:
1717
## Imperative
1818

1919
**State**:
20-
The components' state is a simple object `state: { count: number } = {};`.
20+
The component's state is a simple object `state: { count: number } = {};`.
2121

2222
**Display**:
2323
To display the value we use a template expression `{{ state.count }}`.
@@ -52,8 +52,8 @@ export class MyComponent {
5252
## Reactive reading
5353

5454
**State**:
55-
The components' state gets managed with `RxState` by extending the class. `export class MyComponent extends RxState<{ count: number }> {`
56-
The components' state is a simple interface: `{ count: number }`.
55+
The component's state gets managed with `RxState` by extending the class. `export class MyComponent extends RxState<{ count: number }> {`
56+
The component's state is a simple interface: `{ count: number }`.
5757
Inside the class we expose our state as Observable `readonly state$ = this.select();`
5858

5959
**Display**:
@@ -90,7 +90,7 @@ export class MyComponent extends RxState<{ count: number }> {
9090
## Reactive Writing
9191

9292
**State**:
93-
The components' state gets managed with `RxState` by extending the class. `export class MyComponent extends RxState<{ count: number }> {`
93+
The component's state gets managed with `RxState` by extending the class. `export class MyComponent extends RxState<{ count: number }> {`
9494
The components state is a simple interface `{ count: number }`.
9595
Inside the class we expose our state as Observable `readonly state$ = this.select();`
9696

@@ -104,7 +104,7 @@ The state gets incremented by one whenever the button gets clicked.
104104
In the class we use a Subject to track clicks `btn$ = new Subject();`.
105105
The click binding is set-up over an event binding `(click)` and fires the Subjects `next` method.
106106

107-
This Observable gets connected to the components' state in the constructor `this.connect(btn$, (oldState, clickEvent) => ({ count: s.count + 1 }));`.
107+
This Observable gets connected to the component's state in the constructor `this.connect(btn$, (oldState, clickEvent) => ({ count: s.count + 1 }));`.
108108
Whenever the Subject emits, we apply the increment logic passed as a function.
109109
The function signature looks like this: `(oldState: T, newValue: T[K]) => T`.
110110

@@ -134,7 +134,7 @@ export class MyComponent extends RxState<{ count: number }> {
134134

135135
In this section we use the `zoneless` directive to get control over rendering.
136136

137-
The sections State ans Action are identical.
137+
The sections State and Action are identical.
138138
The Display has a small difference. We use the `zoneless` directive to get rid of renderings caused by the button eventListener.
139139

140140
Rendering:

0 commit comments

Comments
 (0)