Skip to content

Commit 8801a2d

Browse files
committed
Remove the warning dependency since function refs are now standard practice
1 parent b0e3df7 commit 8801a2d

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

packages/react-css-transition-replace/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"dependencies": {
1919
"chain-function": "^1.0.0",
2020
"dom-helpers": "^3.3.1",
21-
"prop-types": "^15.6.1",
22-
"warning": "^3.0.0"
21+
"prop-types": "^15.6.1"
2322
},
2423
"peerDependencies": {
2524
"react": "^15.0.0 || ^16.0.0",

packages/react-css-transition-replace/src/ReactCSSTransitionReplace.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react'
22
import { findDOMNode } from 'react-dom'
33
import PropTypes from 'prop-types'
44
import chain from 'chain-function'
5-
import warning from 'warning'
65

76
import raf from 'dom-helpers/util/requestAnimationFrame'
87

@@ -233,12 +232,6 @@ export default class ReactCSSTransitionReplace extends React.Component {
233232

234233
storeChildRef(child, key) {
235234
const isCallbackRef = typeof child.ref !== 'string'
236-
warning(
237-
isCallbackRef,
238-
'string refs are not supported on children of ReactCSSTransitionReplace and will be ignored. ' +
239-
'Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute',
240-
)
241-
242235
return chain(isCallbackRef ? child.ref : null, r => {
243236
this.childRefs[key] = r
244237
})

0 commit comments

Comments
 (0)