File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed
docs/framework/react/guides
examples/react/custom-devtools/src Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ export function createCounter() {
20
20
return {
21
21
getCount : () => count ,
22
22
increment : () => {
23
- history .push (count )
24
23
count ++
24
+ history .push (count )
25
25
},
26
26
decrement : () => {
27
- history .push (count )
28
27
count --
28
+ history .push (count )
29
29
},
30
30
};
31
31
}
@@ -82,22 +82,22 @@ export function createCounter() {
82
82
return {
83
83
getCount : () => count ,
84
84
increment : () => {
85
- history .push (count )
86
85
count ++
86
+ history .push (count )
87
87
88
88
// The emit eventSuffix must match that of the EventMap defined in eventClient.ts
89
89
DevtoolsEventClient .emit (' counter-state' , {
90
- count: count ,
91
- history: history ,
90
+ count ,
91
+ history ,
92
92
})
93
93
},
94
94
decrement : () => {
95
- history .push (count )
96
95
count --
96
+ history .push (count )
97
97
98
98
DevtoolsEventClient .emit (' counter-state' , {
99
- count: count ,
100
- history: history ,
99
+ count ,
100
+ history ,
101
101
})
102
102
},
103
103
}
Original file line number Diff line number Diff line change @@ -7,20 +7,22 @@ export function createCounter() {
7
7
return {
8
8
getCount : ( ) => count ,
9
9
increment : ( ) => {
10
+ count ++
10
11
history . push ( count )
11
12
12
13
// The emit eventSuffix must match that of the EventMap defined in eventClient.ts
13
14
DevtoolsEventClient . emit ( 'counter-state' , {
14
- count : count ++ ,
15
- history : history ,
15
+ count,
16
+ history,
16
17
} )
17
18
} ,
18
19
decrement : ( ) => {
20
+ count --
19
21
history . push ( count )
20
22
21
23
DevtoolsEventClient . emit ( 'counter-state' , {
22
- count : count -- ,
23
- history : history ,
24
+ count,
25
+ history,
24
26
} )
25
27
} ,
26
28
}
You can’t perform that action at this time.
0 commit comments