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: projects/www/src/app/pages/guide/signals/faq.md
+34-5Lines changed: 34 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Frequently Asked Questions
2
2
3
3
<details>
4
-
<summary>How to connect my SignalStore(s) with Redux DevTools?</summary>
4
+
<summary><b>#1</b> How to connect my SignalStore(s) with Redux DevTools?</summary>
5
5
6
6
There's no official connection between `@ngrx/signals` and the Redux Devtools.
7
7
We expect the Angular Devtools will provide support for signals soon, which can be used to track the state.
@@ -10,7 +10,7 @@ However, you could create a feature for this, or you can make use of the [`withD
10
10
</details>
11
11
12
12
<details>
13
-
<summary>Can I use the Flux/Redux pattern with SignalStore?</summary>
13
+
<summary><b>#2</b> Can I use the Flux/Redux pattern with SignalStore?</summary>
14
14
15
15
Yes. Starting from NgRx version 19.2, the Events plugin introduces support for a Flux-style state management with SignalStore.
16
16
It enables defining and dispatching events, handling them through reducers and effects, and maintaining a unidirectional data flow similar to the traditional Redux pattern.
@@ -19,7 +19,7 @@ For more information, see the Events Plugin documentation.
19
19
</details>
20
20
21
21
<details>
22
-
<summary>Can I define my SignalStore as a class?</summary>
22
+
<summary><b>#3</b> Can I define my SignalStore as a class?</summary>
23
23
24
24
Yes, it is possible to define a SignalStore using a class-based approach.
25
25
However, the NgRx team recommends using the functional style for defining SignalStores.
@@ -43,7 +43,7 @@ export class CounterStore extends signalStore(
43
43
</details>
44
44
45
45
<details>
46
-
<summary>How can I get the type of a SignalStore?</summary>
46
+
<summary><b>#4</b> How can I get the type of a SignalStore?</summary>
47
47
48
48
To get the type of a SignalStore, use the `InstanceType` utility type.
49
49
@@ -60,7 +60,7 @@ function logCount(store: CounterStore): void {
60
60
</details>
61
61
62
62
<details>
63
-
<summary>Can I inject a SignalStore via the constructor?</summary>
63
+
<summary><b>#5</b> Can I inject a SignalStore via the constructor?</summary>
64
64
65
65
Yes. To inject a SignalStore via the constructor, define and export its type with the same name.
66
66
@@ -82,3 +82,32 @@ export class Counter {
82
82
```
83
83
84
84
</details>
85
+
86
+
<details>
87
+
<summary><b>#6</b> Can features like `withComputed` or `withMethods` reference other members inside the same feature?</summary>
88
+
89
+
It may be necessary for a computed in a `withComputed` feature to need to reference another computed value,
90
+
or a method in a `withMethods` feature to refer to another method. To do so, you can break out the common piece
91
+
with a helper that can serve as a function or computed itself.
92
+
93
+
Although it is possible to have multiple features that reference each other, we recommend having everything in one call.
94
+
That adheres more to JavaScript's functional style and keeps features co-located.
0 commit comments