Skip to content

Commit 362c49a

Browse files
committed
fix readme
1 parent af0d526 commit 362c49a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
### 🚨 Updated for 2019
1+
### 🆕 Updated for 2019
22

33
# What's the most powerful and developer-friendly React animation library?
44

5-
### The Task: Replicate this animation in React
5+
### The goal: replicate this animation in React
66

77
![example animation](./src/assets/comparison.gif)
88

@@ -15,26 +15,26 @@ Here's a rundown of what should happen (it's more complex than it appears at fir
1515
5. In-progress animations should be appropriately cancelled if the enter/exit state is toggled rapidly.
1616
6. If the cards were shuffled, they should still animate out with the expected staggered order.
1717

18-
### Why It's Hard
18+
### Why it's hard
1919

2020
1. The sequenced "enter" and "exit" animations of both a parent and its child requires coordination between different components.
2121
2. The enter and exit animations are not simple mirrors of each other, as some libraries expect.
2222
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.
2323
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.
2424
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.
2525

26-
### The Results, Ordered by Preference
26+
### The results, ordered by preference
2727

2828
1. 🥇 **react-transition-group & animejs**
2929

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.
3232
- [my animation attempt](https://alex.holachek.com/react-animation-comparison/?selectedKind=Animation%20Examples&selectedStory=React-Transition-Group%20%2B%20animejs&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel)
3333
- [my code](https://github.com/aholachek/react-animation-comparison/blob/master/src/react-transition-group-anime-example.js)
3434
- [React transition group docs](http://reactcommunity.org/react-transition-group/)
3535
- [Anime docs](https://github.com/juliangarnier/anime)
3636

37-
1. 🥈 **react-spring**
37+
2. 🥈 **react-spring**
3838

3939
- If you'd prefer to use a React-specific library, I recommend `react-spring`.
4040
- The library's use of the hooks API is very concise and expressive -- it took only about 70 lines of code to implement the example!
@@ -44,7 +44,15 @@ Here's a rundown of what should happen (it's more complex than it appears at fir
4444
- [my code](https://github.com/aholachek/react-animation-comparison/blob/master/src/react-spring-example.js)
4545
- [react-spring docs](https://react-spring.surge.sh/)
4646

47-
1. 🥉 **react-pose**
47+
3. 🥉 **react-transition-group & gsap**
48+
49+
- 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.
50+
- [my animation attempt](https://alex.holachek.com/react-animation-comparison/?selectedKind=Animation%20Examples&selectedStory=React-Transition-Group%20%2B%20GSAP&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel)
51+
- [my code](https://github.com/aholachek/react-animation-comparison/blob/master/src/react-transition-group-gsap-example.js)
52+
- [React transition group docs](http://reactcommunity.org/react-transition-group/)
53+
- [GSAP docs](https://greensock.com/docs)
54+
55+
4. **react-pose**
4856

4957
- A year ago, this was my favorite option, but now the number of bugs make me hesitant to recommend it.
5058
- The good:
@@ -58,14 +66,6 @@ Here's a rundown of what should happen (it's more complex than it appears at fir
5866
- [my code](https://github.com/aholachek/react-animation-comparison/blob/master/src/popmotion-pose-example.js)
5967
- [Popmotion Pose docs](https://popmotion.io/pose/)
6068

61-
4. 🥉 **react-transition-group & gsap**
62-
63-
- 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.
64-
- [my animation attempt](https://alex.holachek.com/react-animation-comparison/?selectedKind=Animation%20Examples&selectedStory=React-Transition-Group%20%2B%20GSAP&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel)
65-
- [my code](https://github.com/aholachek/react-animation-comparison/blob/master/src/react-transition-group-gsap-example.js)
66-
- [React transition group docs](http://reactcommunity.org/react-transition-group/)
67-
- [GSAP docs](https://greensock.com/docs)
68-
6969
5. **react-move**
7070

7171
- 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
8181
- [my code](https://github.com/aholachek/react-animation-comparison/blob/master/src/velocity-react-example.js)
8282
- [velocity-react docs](https://github.com/google-fabric/velocity-react)
8383

84-
1. **react-motion**
84+
7. **react-motion**
8585

8686
- I found this library very difficult to use when implementing the example.
8787
- [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

Comments
 (0)