Skip to content

Commit

Permalink
fix: Every element in a seq should have a unique 🔑
Browse files Browse the repository at this point in the history
  • Loading branch information
WarFox committed May 24, 2024
1 parent e79933c commit 833c87f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cljs_2048/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
(let [board (re-frame/subscribe [::subs/board])] ;; Get the current state of the board
[:div.board
;; [:pre (with-out-str (cljs.pprint/pprint @board))] ;; print the board in page for debugging
(map (fn [row] ;; Each row of the board
(map-indexed
(fn [row-index row] ;; Each row of the board
^{:key row-index}
[:div.row
(map-indexed tile-panel row)]);; Each tile of the row
@board)
Expand Down

0 comments on commit 833c87f

Please sign in to comment.