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