Skip to content

Commit d3dea44

Browse files
committed
docs: clarify that nodeRef changes fn signature
1 parent 4cb51a9 commit d3dea44

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
@@ -318,7 +318,7 @@ CSSTransition.propTypes = {
318318
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
319319
* applied.
320320
*
321-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
321+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
322322
*
323323
* @type Function(node: HtmlElement, isAppearing: bool)
324324
*/
@@ -328,7 +328,7 @@ CSSTransition.propTypes = {
328328
* A `<Transition>` callback fired immediately after the 'enter-active' or
329329
* 'appear-active' class is applied.
330330
*
331-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
331+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
332332
*
333333
* @type Function(node: HtmlElement, isAppearing: bool)
334334
*/
@@ -338,7 +338,7 @@ CSSTransition.propTypes = {
338338
* A `<Transition>` callback fired immediately after the 'enter' or
339339
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
340340
*
341-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
341+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
342342
*
343343
* @type Function(node: HtmlElement, isAppearing: bool)
344344
*/

src/Transition.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ Transition.propTypes = {
513513
* DOM node and a `done` callback. Allows for more fine grained transition end
514514
* logic. Timeouts are still used as a fallback if provided.
515515
*
516-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
516+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `done` is being passed as the first argument.
517517
*
518518
* ```jsx
519519
* addEndListener={(node, done) => {
@@ -528,7 +528,7 @@ Transition.propTypes = {
528528
* Callback fired before the "entering" status is applied. An extra parameter
529529
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
530530
*
531-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
531+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
532532
*
533533
* @type Function(node: HtmlElement, isAppearing: bool) -> void
534534
*/
@@ -538,7 +538,7 @@ Transition.propTypes = {
538538
* Callback fired after the "entering" status is applied. An extra parameter
539539
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
540540
*
541-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
541+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
542542
*
543543
* @type Function(node: HtmlElement, isAppearing: bool)
544544
*/
@@ -548,7 +548,7 @@ Transition.propTypes = {
548548
* Callback fired after the "entered" status is applied. An extra parameter
549549
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
550550
*
551-
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
551+
* **Note**: when `nodeRef` prop is passed, `node` is not passed, so `isAppearing` is being passed as the first argument.
552552
*
553553
* @type Function(node: HtmlElement, isAppearing: bool) -> void
554554
*/

0 commit comments

Comments
 (0)