Dashboard sipadu mbip
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
root d8c1b4a1be initial před 5 roky
..
cjs initial před 5 roky
umd initial před 5 roky
LICENSE initial před 5 roky
README.md initial před 5 roky
build-info.json initial před 5 roky
index.js initial před 5 roky
package.json initial před 5 roky
profiling.js initial před 5 roky
server.browser.js initial před 5 roky
server.js initial před 5 roky
server.node.js initial před 5 roky
test-utils.js initial před 5 roky
unstable-fizz.browser.js initial před 5 roky
unstable-fizz.js initial před 5 roky
unstable-fizz.node.js initial před 5 roky
unstable-flight-client.js initial před 5 roky
unstable-flight-server.browser.js initial před 5 roky
unstable-flight-server.js initial před 5 roky
unstable-flight-server.node.js initial před 5 roky
unstable-native-dependencies.js initial před 5 roky

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