react/packages/react-dom
Spyros Ioakeimidis e0a03c1b4d Extend input type check in selection capabilities (#12062) (#12135)
* Do not set selection when prior selection is undefined (#12062)

`restoreSelection` did not account for input elements that have changed
type after the commit phase. The new `text` input supported selection
but the old `email` did not and `setSelection` was incorrectly trying to
restore `null` selection state.

We also extend input type check in selection capabilities to cover cases
where input type is `search`, `tel`, `url`, or `password`.

* Add link to HTML spec for element types and selection

* Add reset button to ReplaceEmailInput

This commit adds a button to restore the original state of the
ReplaceEmailInput fixture so that it can be run multiple times without
refreshing the page.
2018-05-30 07:08:21 -04:00
..
npm Drop Haste (#11303) 2017-10-25 02:55:00 +03:00
src Extend input type check in selection capabilities (#12062) (#12135) 2018-05-30 07:08:21 -04:00
README.md Move npm packages into folder 2015-06-17 12:01:44 -07:00
index.fb.js Remove vars (#11780) 2017-12-06 01:39:48 +00:00
index.js Remove vars (#11780) 2017-12-06 01:39:48 +00:00
package.json Updating package versions for release 16.4.0 2018-05-23 17:30:33 -07:00
server.browser.js Remove vars (#11780) 2017-12-06 01:39:48 +00:00
server.js Drop Haste (#11303) 2017-10-25 02:55:00 +03:00
server.node.js Remove vars (#11780) 2017-12-06 01:39:48 +00:00
test-utils.js Remove vars (#11780) 2017-12-06 01:39:48 +00:00
unstable-native-dependencies.js Reorganize code structure (#11288) 2017-10-19 19:50:24 +01:00

README.md

react-dom

This package serves as the entry point of the DOM-related rendering paths. It is intended to be paired with the isomorphic React, which will be shipped as react to npm.

Installation

npm install react react-dom

Usage

In the browser

var React = require('react');
var ReactDOM = require('react-dom');

class MyComponent extends React.Component {
  render() {
    return <div>Hello World</div>;
  }
}

ReactDOM.render(<MyComponent />, node);

On the server

var React = require('react');
var ReactDOMServer = require('react-dom/server');

class MyComponent extends React.Component {
  render() {
    return <div>Hello World</div>;
  }
}

ReactDOMServer.renderToString(<MyComponent />);

API

react-dom

  • findDOMNode
  • render
  • unmountComponentAtNode

react-dom/server

  • renderToString
  • renderToStaticMarkup