You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-11Lines changed: 21 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -28,10 +28,12 @@ This repository holds a set of helpers that are aiming to provide:
28
28
This is an example of how to use the `*rxLet` directive to bind an Observable value to the template. In this example, the component defines a property `time$`, which is an Observable that emits a value every second using the `timer` operator. The emitted values are mapped to the current time string using the `map` operator which is then displayed in the template using `*rxLet`.
29
29
30
30
```ts
31
+
import { RxLet } from'@rx-angular/template/let';
32
+
31
33
@Component({
32
34
selector: 'app-time',
33
35
standalone: true,
34
-
imports: [LetDirective],
36
+
imports: [RxLet],
35
37
template: `
36
38
<ng-container *rxLet="time$; let value">
37
39
{{ value }}
@@ -47,27 +49,29 @@ To learn more about @rx-angular/template and its capabilities, check out the off
47
49
48
50
### Using `@rx-angular/state`
49
51
50
-
In this example, we're creating a fully reactive counter component. We use the `rxState`functional API to create the state. We also define two actions to increment and decrement the count and use the `connect` function to update the state in response to these actions. Finally, we use the `select` function to display the count property of the state in the template.
52
+
In this example, we're creating a fully reactive counter component. We use `rxState` to manage the component's state, `rxActions` to define structured actions for state updates (specifically `increment` and `decrement`), and `rxEffects`to trigger side-effects when state changes occur. These mechanisms collectively enable efficient state management, action handling, and side-effect execution, resulting in a responsive and well-structured counter component.
To learn more about @rx-angular/state and its capabilities, check out the official documentation at [https://rx-angular.io/docs/state](https://rx-angular.io/docs/state).
98
+
To learn more about `@rx-angular/state` and its capabilities, check out the official documentation at [https://rx-angular.io/docs/state](https://rx-angular.io/docs/state).
0 commit comments