Skip to content

Commit 163ea83

Browse files
committed
Merge branch 'omilli-master'
2 parents b8a521d + a29d0a8 commit 163ea83

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

frameworks/keyed/hellajs/package-lock.json

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/hellajs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"bun": "^1.2.9"
1515
},
1616
"dependencies": {
17-
"@hellajs/core": "^0.6.3"
17+
"@hellajs/core": "^0.10.0",
18+
"@hellajs/dom": "^0.10.0"
1819
}
1920
}

frameworks/keyed/hellajs/src/main.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { html, signal, batch, forEach, mount } from "@hellajs/core";
1+
import { signal, batch } from "@hellajs/core";
2+
import { html, forEach, mount } from "@hellajs/dom";
23

34
const { div, table, tbody, tr, td, button, span, a, h1 } = html;
45

@@ -37,18 +38,18 @@ function Bench() {
3738
const selected = signal(undefined);
3839

3940
const create = (count) => {
40-
rows.set(buildData(count));
41+
rows(buildData(count));
4142
}
4243

4344
const append = (count) => {
44-
rows.set([...rows(), ...buildData(count)]);
45+
rows([...rows(), ...buildData(count)]);
4546
}
4647

4748
const update = () => {
4849
batch(() => {
4950
for (let i = 0, d = rows(), len = d.length; i < len; i += 10) {
5051
const label = d[i].label;
51-
label.set(`${label()} !!!`);
52+
label(`${label()} !!!`);
5253
}
5354
})
5455
};
@@ -59,16 +60,16 @@ function Bench() {
5960
let item = list[1];
6061
list[1] = list[998];
6162
list[998] = item;
62-
rows.set(list);
63+
rows(list);
6364
}
6465
};
6566

6667
const remove = (id) => {
67-
rows.set(rows().filter(row => row.id !== id));
68+
rows(rows().filter(row => row.id !== id));
6869
}
6970

7071
const clear = () => {
71-
rows.set([]);
72+
rows([]);
7273
}
7374

7475
return div({ id: 'main' },
@@ -94,7 +95,7 @@ function Bench() {
9495
tr({ class: () => (selected() === row.id ? 'danger' : '') },
9596
td({ class: 'col-md-1' }, row.id),
9697
td({ class: 'col-md-4' },
97-
a({ class: 'lbl', onclick: () => selected.set(row.id) },
98+
a({ class: 'lbl', onclick: () => selected(row.id) },
9899
row.label
99100
),
100101
),

0 commit comments

Comments
 (0)