React key with :> works now

This commit is contained in:
Juho Teperi 2020-04-19 15:19:28 +03:00
parent 9dfe18e918
commit e2f3717d93
1 changed files with 2 additions and 3 deletions

View File

@ -25,11 +25,10 @@
[:> TransitionGroup
{:component "ul"}
(for [e (:elements @state)]
;; Looks like :key from props doesn't work with native components
^{:key e}
;; Can't move this to separate function, or reagent will add component in between and transitions break
[:> CSSTransition
{:classNames "fade"
{:key e
:classNames "fade"
:timeout 500
:on-enter #(js/console.log "enter" e)
:on-entering #(js/console.log "entering" e)