Skip to content

Commit ff352ce

Browse files
committed
fix id atom
1 parent b5ab6cf commit ff352ce

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

frameworks/keyed/helix/shadow-cljs.edn

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
[lucywang000/hashp "0.1.2"]
88
[binaryage/devtools "1.0.0"]]
99

10+
:nrepl {:port 6666
11+
:cider true
12+
:init-ns user}
13+
1014
:builds {:app {:target :browser
1115

1216
:dev

frameworks/keyed/helix/src/demo/main.cljs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
:aria-hidden "true"})))
3636
(d/td {:class "col-md-6"})))
3737

38+
(defonce id-atom (atom 0))
39+
3840
(defnc main []
39-
(let [id-atom (atom 0)
40-
[data set-data] (use-state [])
41+
(js/console.log "re-render")
42+
(let [[data set-data] (use-state [])
4143
[selected set-selected] (use-state nil)
4244
print-duration
4345
(fn print-duration []
@@ -86,7 +88,7 @@
8688
(d/div
8789
{:class "row"}
8890
(d/div {:class "col-md-6"}
89-
(d/h1 "Helix"))
91+
(d/h1 (str "Helix (total rows " (count data) ")")))
9092
(d/div {:class "col-md-6"}
9193
(d/div {:class "row"}
9294
(d/div {:class "col-sm-6 smallpad"}

0 commit comments

Comments
 (0)