Skip to content

Commit

Permalink
README tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwcomeau committed Apr 27, 2017
1 parent cc60d00 commit 0c0c964
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ const TopArticles = ({ articles }) => (
```


## API Reference

View the [full API reference documentation](https://github.com/joshwcomeau/react-flip-move/blob/master/documentation/api_reference.md)


## Enter/Leave Animations

View the [enter/leave docs](https://github.com/joshwcomeau/react-flip-move/blob/master/documentation/enter_leave_animations.md)


## Compatibility

Expand All @@ -95,23 +104,11 @@ const TopArticles = ({ articles }) => (
| Supported | ✔ 10+ | ✔ 4+ | ✔ 6.1+ | ✔ 10+ || ✔ 6.1+ ||



## How It Works

Curious how this works, under the hood? [__Read the Medium post__](https://medium.com/@joshuawcomeau/animating-the-unanimatable-1346a5aab3cd).



## Enter/Leave Animations

View the [enter/leave docs](https://github.com/joshwcomeau/react-flip-move/blob/master/documentation/enter_leave_animations.md)


## API Reference

View the [full API reference documentation](https://github.com/joshwcomeau/react-flip-move/blob/master/documentation/api_reference.md)


---

### HTML Attributes
Expand Down Expand Up @@ -151,6 +148,8 @@ This works for all HTML props - there's no validation.

* All children **need a unique `key` property**. Even if Flip Move is only given a single child, it needs to have a unique `key` prop for Flip Move to track it.

* FlipMove clones the direct children passed to it and overwrites the `ref` prop. As a result, you won't be able to set a `ref` on the top-most elements passed to FlipMove. An easy workaround is just to wrap the elements you pass to FlipMove in a `<div>`.

* Elements whose positions have not changed between states will not be animated. This means that no `onStart` or `onFinish` callbacks will be executed for those elements.

* Sometimes you'll want to update or change an item _without_ triggering a Flip Move animation. For example, with optimistic updating, you may render a temporary version before replacing it with the server-validated one. In this case, simply use the same `key` for both versions, and Flip Move will treat them as the same item.
Expand Down

0 comments on commit 0c0c964

Please sign in to comment.