Last active
July 27, 2016 21:15
-
-
Save Deraen/ae8e142ea3d06e31eacb998dcef9d8cb 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
(defn animated-component [] | |
(let [fade-anim (ui/animated-value. 0)] | |
(r/create-class | |
{:component-did-mount | |
(fn [this] | |
(-> ui/animated | |
(.timing fade-anim #js {:toValue 1 | |
:duration 3000}) | |
(.start))) | |
:reagent-render | |
(fn [] | |
[ui/animated-view | |
{:style {:background-color "blue" | |
:width 20 | |
:height 20 | |
:opacity fade-anim}}])})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment