We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7472f70 commit dfd4739Copy full SHA for dfd4739
apps/signal/50-bug-in-effect/src/app/app.component.ts
@@ -44,12 +44,25 @@ export class AppComponent {
44
Explain for your junior team mate why this bug occurs ...
45
*/
46
effect(() => {
47
- console.log('Effect ran');
48
const drive = this.drive();
+
49
+ if (drive) {
50
+ alert('Price increased!');
51
+ }
52
+ });
53
54
+ effect(() => {
55
const ram = this.ram();
56
57
+ if (ram) {
58
59
60
61
62
63
const gpu = this.gpu();
64
- if (drive || ram || gpu) {
65
+ if (gpu) {
66
alert('Price increased!');
67
}
68
});
0 commit comments