Skip to content

Commit

Permalink
react-addons-dom-factories (facebook#9780)
Browse files Browse the repository at this point in the history
**what is the change?:**
`grep -r "react-addons-dom-factories" ./src` and the same in `./packages`
then `%s /react-addons-dom-factories/react-dom-factories/gc`

**why make this change?:**
React dom factories were never part of the 'addons' and we want to minimize the
whole 'addons' thing, since we are deprecating the `React.addons.*` API.

**test plan:**
`yarn test`
and manually look at the README that was updated.

**issue:**
facebook#9398
  • Loading branch information
flarnie committed Jun 7, 2017
1 parent 64fff1b commit f21b882
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/react-dom-factories/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# `react-addons-dom-factories`
# `react-dom-factories`

> Note:
> `ReactDOMFactories` is a legacy add-on. Consider using
> `React.createFactory` or JSX instead.
Prior to version 16.0.0, React maintained a whitelist of
pre-configured DOM factories. These predefined factories have been
moved to the `react-addons-dom-factories` library.
moved to the `react-dom-factories` library.

## Example

```javascript
import ReactDOM from 'react-dom';
import DOM from 'react-addons-dom-factories';
import DOM from 'react-dom-factories';

const greeting = DOM.div({ className: 'greeting' }, DOM.p(null, 'Hello, world!'));

Expand Down
6 changes: 3 additions & 3 deletions src/isomorphic/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ if (__DEV__) {

// React.DOM factories are deprecated. Wrap these methods so that
// invocations of the React.DOM namespace and alert users to switch
// to the `react-addons-dom-factories` package.
// to the `react-dom-factories` package.
React.DOM = {};
var warnedForFactories = false;
Object.keys(ReactDOMFactories).forEach(function(factory) {
Expand All @@ -149,9 +149,9 @@ if (__DEV__) {
false,
'Accessing factories like React.DOM.%s has been deprecated ' +
'and will be removed in v16.0+. Use the ' +
'react-addons-dom-factories package instead. ' +
'react-dom-factories package instead. ' +
' Version 1.0 provides a drop-in replacement.' +
' For more info, see https://fb.me/react-addons-dom-factories',
' For more info, see https://fb.me/react-dom-factories',
factory,
);
warnedForFactories = true;
Expand Down

0 comments on commit f21b882

Please sign in to comment.