Skip to content

Commit a00e648

Browse files
committed
use key instead of deprecated crank-key
1 parent d81dfdb commit a00e648

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

frameworks/keyed/crank/src/main.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ function Button({id, title}) {
3434
);
3535
}
3636

37-
3837
function Jumbotron() {
3938
this.addEventListener("click", (ev) => {
4039
if (ev.target.tagName === "BUTTON") {
@@ -175,15 +174,15 @@ function *Main() {
175174
this.refresh();
176175
});
177176

178-
while (true) {
177+
for ({} of this) {
179178
yield (
180179
<div class="container">
181180
<Jumbotron />
182181
<table class="table table-hover table-striped test-data">
183182
<tbody>
184183
{data.map((item) => (
185184
<Row
186-
crank-key={item.id}
185+
key={item.id}
187186
item={item}
188187
selected={item.id === selected}
189188
/>

0 commit comments

Comments
 (0)