Skip to content

Commit c863158

Browse files
committed
Expand notes for v4.4.0 and add missing fix
1 parent 80b663e commit c863158

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@
44
### Features
55

66
* add `nodeRef` alternative instead of internal `findDOMNode` ([#559](https://github.com/reactjs/react-transition-group/issues/559)) ([85016bf](https://github.com/reactjs/react-transition-group/commit/85016bfddd3831e6d7bb27926f9f178d25502913))
7+
- react-transition-group internally uses `findDOMNode`, which is deprecated and produces warnings in [Strict Mode](https://reactjs.org/docs/strict-mode.html), so now you can optionally pass `nodeRef` to `Transition` and `CSSTransition`, it's a ref object that should point to the transitioning child:
8+
9+
```jsx
10+
import React from "react"
11+
import { CSSTransition } from "react-transition-group"
12+
13+
const MyComponent = () => {
14+
const nodeRef = React.useRef(null)
15+
return (
16+
<CSSTransition nodeRef={nodeRef} in timeout={200} classNames="fade">
17+
<div ref={nodeRef}>Fade</div>
18+
</CSSTransition>
19+
)
20+
}
21+
```
22+
### Bug Fixes
23+
24+
* set the values of constants attached to `Transition` to match the exported ones ([#554](https://github.com/reactjs/react-transition-group/pull/554))
725

826
# [4.3.0](https://github.com/reactjs/react-transition-group/compare/v4.2.2...v4.3.0) (2019-09-05)
927

0 commit comments

Comments
 (0)