Skip to content

Commit c89f807

Browse files
authored
Merge pull request #852 from reactjs/docs/node-ref-argument-order
docs: clarify that nodeRef changes fn signature
2 parents dd0f387 + d3dea44 commit c89f807

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/CSSTransition.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ CSSTransition.propTypes = {
319319
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
320320
* applied.
321321
*
322-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
322+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
323323
*
324324
* @type Function(node: HtmlElement, isAppearing: bool)
325325
*/
@@ -329,7 +329,7 @@ CSSTransition.propTypes = {
329329
* A `<Transition>` callback fired immediately after the 'enter-active' or
330330
* 'appear-active' class is applied.
331331
*
332-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
332+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
333333
*
334334
* @type Function(node: HtmlElement, isAppearing: bool)
335335
*/
@@ -339,7 +339,7 @@ CSSTransition.propTypes = {
339339
* A `<Transition>` callback fired immediately after the 'enter' or
340340
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
341341
*
342-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
342+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
343343
*
344344
* @type Function(node: HtmlElement, isAppearing: bool)
345345
*/

src/Transition.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ Transition.propTypes = {
524524
* DOM node and a `done` callback. Allows for more fine grained transition end
525525
* logic. Timeouts are still used as a fallback if provided.
526526
*
527-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
527+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `done` is being passed as the first argument.
528528
*
529529
* ```jsx
530530
* addEndListener={(node, done) => {
@@ -539,7 +539,7 @@ Transition.propTypes = {
539539
* Callback fired before the "entering" status is applied. An extra parameter
540540
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
541541
*
542-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
542+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
543543
*
544544
* @type Function(node: HtmlElement, isAppearing: bool) -> void
545545
*/
@@ -549,7 +549,7 @@ Transition.propTypes = {
549549
* Callback fired after the "entering" status is applied. An extra parameter
550550
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
551551
*
552-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
552+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
553553
*
554554
* @type Function(node: HtmlElement, isAppearing: bool)
555555
*/
@@ -559,7 +559,7 @@ Transition.propTypes = {
559559
* Callback fired after the "entered" status is applied. An extra parameter
560560
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
561561
*
562-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
562+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
563563
*
564564
* @type Function(node: HtmlElement, isAppearing: bool) -> void
565565
*/

0 commit comments

Comments
 (0)