Created
October 21, 2023 19:50
-
-
Save nivekuil/462169c78f9d6f74e8a6bf9eed7b84ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(dom/div | |
(let [!cs (atom [0 1 2 3 4]) cs (e/watch !cs)] | |
(e/for [c cs] | |
(ui/button | |
(e/fn [] (reset! !cs (vec (remove #{c} cs)))) | |
(dom/props {:class "fade-in"}) | |
(dom/text "REMOVE " c))) | |
(ui/button | |
(e/fn [] (swap! !cs conj (inc (peek cs)))) | |
(dom/text "ADD")))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@keyframes fade-in { | |
0% { opacity: 0; } | |
100% { opacity: 1;} | |
} | |
.fade-in { | |
animation: fade-in .5s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment