Dashboard sipadu mbip
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
root d8c1b4a1be initial 5 年前
..
cjs initial 5 年前
umd initial 5 年前
LICENSE initial 5 年前
README.md initial 5 年前
build-info.json initial 5 年前
index.js initial 5 年前
package.json initial 5 年前
profiling.js initial 5 年前
server.browser.js initial 5 年前
server.js initial 5 年前
server.node.js initial 5 年前
test-utils.js initial 5 年前
unstable-fizz.browser.js initial 5 年前
unstable-fizz.js initial 5 年前
unstable-fizz.node.js initial 5 年前
unstable-flight-client.js initial 5 年前
unstable-flight-server.browser.js initial 5 年前
unstable-flight-server.js initial 5 年前
unstable-flight-server.node.js initial 5 年前
unstable-native-dependencies.js initial 5 年前

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