Skip to content

Instantly share code, notes, and snippets.

@ethan-deng
Last active November 3, 2016 20:52
Show Gist options
  • Save ethan-deng/093df19c14a99386cd0bf460d7bc0b0e to your computer and use it in GitHub Desktop.
Save ethan-deng/093df19c14a99386cd0bf460d7bc0b0e to your computer and use it in GitHub Desktop.

React Animation

  1. CSS animation can be applied directly to component that never enter or leave the dom. For example, a preploaded layer which is hidden to the left.

  2. CSS animation can be used directly on component using inline style.

  3. Use the pattern for single component

<ReactTransitionGroup component={FirstChild}>
  {someCondition ? <MyComponent /> : null}
</ReactTransitionGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment