unpkg/public/react-dom@16.7.0
Michael Jackson bbb092d974 Load React + Emotion from CDN URLs, use globals
Remove @emotion/babel-preset-css-prop and import { jsx } from
@emotion/core directly instead so Rollup can preserve imports order when
bundling (instead of @emotion/core automatically inserting itself as the
first import).
2019-01-23 21:27:58 -08:00
..
cjs Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
umd Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
LICENSE Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
README.md Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
build-info.json Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
index.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
package.json Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
profiling.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
server.browser.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
server.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
server.node.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
test-utils.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
unstable-fizz.browser.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
unstable-fizz.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
unstable-fizz.node.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00
unstable-native-dependencies.js Load React + Emotion from CDN URLs, use globals 2019-01-23 21:27:58 -08:00

README.md

react-dom

This package serves as the entry point to the DOM and server renderers for React. It is intended to be paired with the generic React package, which is 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