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