Skip to content

Commit bb5613c

Browse files
committed
README additions and v1.1.1 changelog.
1 parent 696f1fc commit bb5613c

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
### v1.1.1 (4 April 2016)
2+
3+
* [BUGFIX] Corrected the file name in the `main` field of package.json. (#13)
4+
* [BUGFIX] Allow prop `transitionName` to be type of `object`. (#9,#12)
5+
* [DOCUMENTATION] Added a Hardware Acceleration example to the README. (#8)
6+
* [DOCUMENTATION] Add a note that `transitionAppear` is also supported. (#7)
7+
18
### v1.1.0 (24 November 2015)
29

310
* [ENHANCEMENT] The entering component, which is absolutely positioned, is not only positioned with `top:0` and `left:0`
411
styles, but also `right:0` and `bottom:0` so smaller content fills the entire container.
512

613
### v1.0.1 (24 November 2015)
714

8-
* [ENHANCEMENT] Support no children so the child component can be removed / added. (Fixes #4)
15+
* [ENHANCEMENT] Support no children so the child component can be removed / added. (#4)
916
* [ENHANCEMENT] Added an add/remove content section to the demo and docs.
1017

1118
### v1.0.0 (8 November 2015)

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ that the transition duration must be specified in JavaScript as well as CSS.
2828
Install via `npm`:
2929

3030
```
31-
npm install --save react-css-transition-replace
31+
npm install react-css-transition-replace
3232
```
3333

3434

3535
## Usage
3636

3737
A `ReactCSSTransitionReplace` component can only have a single child. Other than that, the basic usage
38-
follows the exact same API as `ReactCSSTransitionGroup`. When the `key` of the child component changes, the
39-
previous component is animated out and the new component animated in. During this process:
38+
follows the exact same API as `ReactCSSTransitionGroup`, with support for `transitionEnter`, `transitionLeave`
39+
and `transitionAppear`. When the `key` of the child component changes, the previous component is animated out
40+
and the new component animated in. During this process:
4041

4142
- The leaving component continues to be rendered as usual with `static` positioning.
4243
- The entering component is positioned on top of the leaving component with `absolute` positioning.
@@ -136,7 +137,9 @@ See the live example [here](http://marnusw.github.io/react-css-transition-replac
136137

137138
### Hardware acceleration for smoother transitions
138139

139-
For even smoother transitions, try to trigger hardware acceleration whenever possible. Here is an example of what you could do for a mobile app transition between pages:
140+
For smoother transitions hardware acceleration, which is achieved by using translate3d instead of the 2D
141+
translations, should be used whenever possible. For example, to realize a mobile app transition between
142+
pages one might use:
140143

141144
```css
142145
.page-enter, .page-leave {
@@ -164,15 +167,14 @@ For even smoother transitions, try to trigger hardware acceleration whenever pos
164167
}
165168
```
166169

167-
```
170+
```javascript
168171
<ReactCSSTransitionReplace transitionName="page" transitionEnterTimeout={250} transitionLeaveTimeout={250} >
169172
<div key="page01">
170173
My page 01 content
171174
</div>
172175
</ReactCSSTransitionReplace>
173176
```
174177

175-
The use of translate3d instead of 2D translate will trigger hardware acceleration and make your transition even smoother.
176178

177179
## Tips
178180

0 commit comments

Comments
 (0)