Files
react.dev/docs/addons.md
Nathan Hunzaker 1a25a17ab0 Move ReactDOMFactories into separate package (#8356)
- Update examples to no longer use React.DOM
- Add package and documentation entries for react-addons-dom-factories
- Update dom-factories readme
- Set up proxy to intercept React.DOM usage
- Update ReactDOM children tests to use createElement
- Add more specific warning assertion for React DOM factories
- Do not use expectDev in ReactDOMFactories tests
2017-04-24 08:08:17 -07:00

2.1 KiB

id, title, permalink
id title permalink
addons Add-Ons docs/addons.html

Note: React.addons is deprecated as of React v15.5. The add-ons have now all either been deprecated or moved to separate modules.

The React add-ons are a collection of useful utility modules for building React apps. These should be considered experimental and tend to change more often than the core.

The add-ons below are in the development (unminified) version of React only:

  • Perf, a performance profiling tool for finding optimization opportunities.
  • ReactTestUtils, simple helpers for writing test cases.

Legacy Add-ons

The add-ons below are considered legacy and their use is discouraged.

Deprecated Add-ons

Using React with Add-ons

You can install the add-ons individually from npm (e.g. npm install react-addons-create-fragment) and import them:

import createFragment from 'react-addons-create-fragment'; // ES6
var createFragment = require('react-addons-create-fragment'); // ES5 with npm

When using a CDN, you can use react-with-addons.js instead of react.js:

<script src="https://unpkg.com/react@15/dist/react-with-addons.js"></script>

The add-ons will be available via the React.addons global (e.g. React.addons.TestUtils).