GT2/Ejectable/node_modules/react-dom
Ren Juan 06c1a5835d set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
..
cjs set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
umd set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
LICENSE set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
README.md set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
build-info.json set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
index.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
package.json set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
profiling.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
server.browser.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
server.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
server.node.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
test-utils.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
unstable-fizz.browser.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
unstable-fizz.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
unstable-fizz.node.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
unstable-native-dependencies.js set clean start from expo 4.10 2021-08-16 00:14:59 +00: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