-
Notifications
You must be signed in to change notification settings - Fork 47.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1e16b9
commit c04d02e
Showing
3 changed files
with
48 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,3 @@ | ||
/* eslint-disable comma-dangle */ | ||
'use strict'; | ||
|
||
var React = require('./lib/React'); | ||
|
||
var assign = require('./lib/Object.assign'); | ||
var deprecated = require('./lib/deprecated'); | ||
|
||
// We want to warn once when any of these methods are used. | ||
if (process.env.NODE_ENV !== 'production') { | ||
var deprecations = { | ||
// ReactDOM | ||
findDOMNode: deprecated( | ||
'findDOMNode', | ||
'react-dom', | ||
React, | ||
React.findDOMNode | ||
), | ||
render: deprecated( | ||
'render', | ||
'react-dom', | ||
React, | ||
React.render | ||
), | ||
unmountComponentAtNode: deprecated( | ||
'unmountComponentAtNode', | ||
'react-dom', | ||
React, | ||
React.unmountComponentAtNode | ||
), | ||
// ReactDOMServer | ||
renderToString: deprecated( | ||
'renderToString', | ||
'react-dom/server', | ||
React, | ||
React.renderToString | ||
), | ||
renderToStaticMarkup: deprecated( | ||
'renderToStaticMarkup', | ||
'react-dom/server', | ||
React, | ||
React.renderToStaticMarkup | ||
) | ||
}; | ||
// Export a wrapped object. We'll use assign and take advantage of the fact | ||
// that this will override the original methods in React. | ||
module.exports = assign( | ||
{}, | ||
React, | ||
deprecations | ||
); | ||
} else { | ||
module.exports = React; | ||
} | ||
module.exports = require('./lib/React'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters