@@ -64,15 +64,43 @@ <h2>Overview</h2>
6464 < a href ="index.html " target ="_blank "> Signals</ a > Recap
6565 (Foundation)
6666 </ li >
67+ < li > Effects vs. Computed Signals</ li >
6768 < li > Input Signals</ li >
6869 < li > Outputs</ li >
6970 < li > View Child Signals</ li >
7071 < li > Content Child Signals</ li >
71- < li > Effects vs. Computed Signals</ li >
72+ < li > Linked Signals</ li >
7273 < li > Exercise: Dice-Signals</ li >
7374 </ ul >
7475 </ section >
7576
77+ < section >
78+ < h2 > Effects vs. Computed Signals</ h2 >
79+ < p > Which one I should use?</ p >
80+ </ section >
81+
82+ < section >
83+ < h2 > Effects vs. Computed Signals</ h2 >
84+ < strong > Use Cases for Computed Signals</ strong >
85+ < ul >
86+ < li >
87+ Calculation should return a value and can be done with pure
88+ functions
89+ </ li >
90+ < li > Deriving reactive values</ li >
91+ < li >
92+ No side effects - signal caches its result until dependencies
93+ change
94+ </ li >
95+ </ ul >
96+
97+ < strong > Use Cases for Effects</ strong >
98+ < ul >
99+ < li > Performing side effects as logging, API calls</ li >
100+ < li > Trigger external actions</ li >
101+ </ ul >
102+ </ section >
103+
76104 < section >
77105 < h2 > Input Signals (1/2)</ h2 >
78106
@@ -176,29 +204,24 @@ <h2>Content Child Signals</h2>
176204 </ section >
177205
178206 < section >
179- < h2 > Effects vs. Computed Signals</ h2 >
180- < p > Which one I should use?</ p >
181- </ section >
207+ < h2 > Linked Signals</ h2 >
182208
183- < section >
184- < h2 > Effects vs. Computed Signals</ h2 >
185- < strong > Use Cases for Computed Signals</ strong >
186- < ul >
187- < li >
188- Calculation should return a value and can be done with pure
189- functions
190- </ li >
191- < li > Deriving reactive values</ li >
192- < li >
193- No side effects - signal caches its result until dependencies
194- change
195- </ li >
196- </ ul >
197-
198- < strong > Use Cases for Effects</ strong >
209+ < p >
210+ Linked signals are similar to writable signals, but they also react
211+ to changes of another source signal
212+ </ p >
213+ < pre > < code class ="hljs typescript " data-trim >
214+ < script type ="text/template ">
215+ myLinkedSignal = linkedSignal ( {
216+ source : this . anotherSignal
217+ computation : ( newValue , previous ) = > calculateMyNewValue ( )
218+ } )
219+ </ script >
220+ </ code > </ pre >
221+ < p > Value can be changed</ p >
199222 < ul >
200- < li > Performing side effects as logging, API calls </ li >
201- < li > Trigger external actions </ li >
223+ < li > by set function </ li >
224+ < li > by value change of the source signal </ li >
202225 </ ul >
203226 </ section >
204227
@@ -213,35 +236,38 @@ <h2>Exercise: Dice Signals</h2>
213236 </ section >
214237
215238 < section >
216- < h2 > Exercise: Instructions</ h2 >
217- < ul >
218- < li >
219- Start with task 01 on branch exercise-01-rxjs. Try to fill the
220- gaps marked by "Todo".
221- </ li >
222- < li >
223- For task 02 you can either continue to work on your solution of
224- task 01 or check out the branch exercise-02-rxjs which already
225- contains a solution for task 01. See readme files on the branches
226- for more info.
227- </ li >
228- < li >
229- Implement the same app now using signals: check out branch
230- exercise-01-signals and implement Todos.
231- </ li >
232- < li >
233- If required you can have a look at the sample solutions on the
234- corresponding branches.
235- </ li >
236- </ ul >
239+ < h2 > Exercise</ h2 >
240+ < h4 > Two Parts</ h4 >
241+
242+ < table >
243+ < tr >
244+ < th > RxJS</ th >
245+ < th > Signals</ th >
246+ </ tr >
247+ < tr >
248+ < td > Exercises 01 and 02</ td >
249+ < td > Exercises 01 and 02</ td >
250+ </ tr >
251+ </ table >
252+ < p class ="hint center ">
253+ Start with task 01 on branch exercise-01-rxjs. Try to fill the gaps
254+ marked by "Todo".
255+ </ p >
256+ < p class ="hint center ">
257+ For task 02 you can either continue to work on your solution of task
258+ 01 or check out the branch exercise-02-rxjs which already contains a
259+ solution for task 01.
260+ </ p >
261+ < p > See readme files on the branches for more info</ p >
237262 </ section >
263+
238264 < section >
239265 < h2 > Branches</ h2 >
240- < table >
266+ < table width =" 1100px " >
241267 < tr >
242268 < th > Task</ th >
243- < th > Observables ( RxJS) </ th >
244- < th > Signals</ th >
269+ < th style =" width: 40% " > RxJS</ th >
270+ < th style =" width: 40% " > Signals</ th >
245271 </ tr >
246272 < tr >
247273 < td > Task 01</ td >
0 commit comments