1

I have a component which is wrapped in an if like so:

(if @(subscribe [:some-condition])
    [:div.show-me "Show me"]
)

And I want to apply an animation to the show-me div as soon as it is displayed, i.e., when the condition is true. Now, I know how to apply transitions in css using selectors like :hover, and :active, for example:

.show-me {
    transition: all 1s ease-in-out;
}

.show-me:hover {
    transform: scale (1.1em);
}

Will scale the div when hovered over.

But how to scale, for example, a div as soon as it is shown?

zengod
  • 1,114
  • 13
  • 26
  • 1
    This isn't really specific to Reagent, and you'd probably get better results if you posted a React version of this question and applied the answers, but the short answer is you are trying to [Animate an element on append](https://stackoverflow.com/questions/24148403/trigger-css-transition-on-appended-element) – Walton Hoops Mar 20 '20 at 15:18

0 Answers0