You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
### 🚨 Updated for 2019
1
+
### 🆕 Updated for 2019
2
2
3
3
# What's the most powerful and developer-friendly React animation library?
4
4
5
-
### The Task: Replicate this animation in React
5
+
### The goal: replicate this animation in React
6
6
7
7

8
8
@@ -15,26 +15,26 @@ Here's a rundown of what should happen (it's more complex than it appears at fir
15
15
5. In-progress animations should be appropriately cancelled if the enter/exit state is toggled rapidly.
16
16
6. If the cards were shuffled, they should still animate out with the expected staggered order.
17
17
18
-
### Why It's Hard
18
+
### Why it's hard
19
19
20
20
1. The sequenced "enter" and "exit" animations of both a parent and its child requires coordination between different components.
21
21
2. The enter and exit animations are not simple mirrors of each other, as some libraries expect.
22
22
3. The positions of the grid and cards should be animated with a spring (or, failing that, with an elastic easing), while opacity changes should have a linear easing.
23
23
4. The cards animating in and out are initially staggered, but adding or removing cards one-by-one should result in a fluid animation with no delay.
24
24
5. Toggling the example rapidly should not create a broken view— cancelled animations should be cleaned up and there shouldn't be any straggler DOM elements left behind.
25
25
26
-
### The Results, Ordered by Preference
26
+
### The results, ordered by preference
27
27
28
28
1. 🥇 **react-transition-group & animejs**
29
29
30
-
- Using `react-transition-group` and a JavaScript animation library ended up being my favorite technique, because it offers total flexibility and control, at the cost of additional complexity.
31
-
-`Animejs` is lightweight and open source, and I find the imperative API more intuitive than the typical React approach for coordinated, complex animations.
30
+
- Using `react-transition-group` and a vanilla JavaScript animation library ended up being my favorite technique, because it offers total flexibility and control, at the cost of some additional complexity.
31
+
-`Animejs` is lightweight and open source, and I find its imperative API more intuitive than the typical React approach for coordinated, complex animations.
- Basically the same as the `animejs` example, just with the animation library swapped out. `GSAP` has a less permissive license and it's older and heavier than `animejs`, but it's battle-tested and powerful.
- Basically the same as the `animejs` example, just with the animation library swapped out. `GSAP` has a less permissive license and it's older and heavier than `animejs`, but it's battle-tested and powerful.
-[React transition group docs](http://reactcommunity.org/react-transition-group/)
67
-
-[GSAP docs](https://greensock.com/docs)
68
-
69
69
5.**react-move**
70
70
71
71
- A lightweight library that helps `D3` and `React` work together. It ended up not being quite flexible enough for the needs of this task, though if the demo featured more traditionally D3-like interactions it would have been great.
@@ -81,7 +81,7 @@ Here's a rundown of what should happen (it's more complex than it appears at fir
- I found this library very difficult to use when implementing the example.
87
87
-[my sad animation attempt](https://alex.holachek.com/react-animation-comparison/?selectedKind=Animation%20Examples&selectedStory=React-Motion&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel)
0 commit comments