Skip to content

Commit 82c8040

Browse files
committed
update cample to 3.2.0-alpha.34
1 parent 9922443 commit 82c8040

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

frameworks/keyed/cample/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-framework-benchmark-cample",
3-
"version": "3.2.0-alpha.33",
3+
"version": "3.2.0-alpha.34",
44
"description": "cample demo",
55
"main": "dist/main.js",
66
"js-framework-benchmark": {
@@ -30,6 +30,6 @@
3030
"webpack-cli": "5.1.4"
3131
},
3232
"dependencies": {
33-
"cample": "3.2.0-alpha.33"
33+
"cample": "3.2.0-alpha.34"
3434
}
3535
}

frameworks/keyed/cample/src/main.js

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,19 @@ const adjectives = [
2727
"expensive",
2828
"fancy",
2929
],
30-
colours = ["red", "yellow", "blue", "green", "pink", "brown", "purple", "brown", "white", "black", "orange"],
30+
colours = [
31+
"red",
32+
"yellow",
33+
"blue",
34+
"green",
35+
"pink",
36+
"brown",
37+
"purple",
38+
"brown",
39+
"white",
40+
"black",
41+
"orange",
42+
],
3143
nouns = [
3244
"table",
3345
"chair",
@@ -138,29 +150,25 @@ const mainComponent = component(
138150
},
139151
functions: {
140152
run: [
141-
(setData, event) => () => {
142-
event.stopPropagation();
153+
(setData) => () => {
143154
setData(() => buildData(1000));
144155
},
145156
"updateRows",
146157
],
147158
runLots: [
148-
(setData, event) => () => {
149-
event.stopPropagation();
159+
(setData) => () => {
150160
setData(() => buildData(10000));
151161
},
152162
"updateRows",
153163
],
154164
add: [
155-
(setData, event) => () => {
156-
event.stopPropagation();
165+
(setData) => () => {
157166
setData((d) => [...d, ...buildData(1000)]);
158167
},
159168
"updateRows",
160169
],
161170
update: [
162-
(setData, event) => () => {
163-
event.stopPropagation();
171+
(setData) => () => {
164172
setData((d) => {
165173
const value = d.slice();
166174
for (let i = 0; i < value.length; i += 10) {
@@ -173,15 +181,13 @@ const mainComponent = component(
173181
"updateRows",
174182
],
175183
clear: [
176-
(setData, event) => () => {
177-
event.stopPropagation();
184+
(setData) => () => {
178185
setData(() => []);
179186
},
180187
"updateRows",
181188
],
182189
swapRows: [
183-
(setData, event) => () => {
184-
event.stopPropagation();
190+
(setData) => () => {
185191
setData((d) => {
186192
const value = d.slice();
187193
const tmp = value[1];
@@ -201,15 +207,13 @@ const mainComponent = component(
201207
},
202208
functions: {
203209
setSelected: [
204-
(setData, event) => (id) => {
205-
event.stopPropagation();
210+
(setData) => (id) => {
206211
setData(() => id);
207212
},
208213
"updateSelected",
209214
],
210215
delete: [
211-
(setData, event) => (id) => {
212-
event.stopPropagation();
216+
(setData) => (id) => {
213217
setData((d) => {
214218
const idx = d.findIndex((d) => d.id === id);
215219
return [...d.slice(0, idx), ...d.slice(idx + 1)];

0 commit comments

Comments
 (0)