katoikia-app/web-ui/web-react/node_modules/react-dom
Maria Sanchez 5abf040b42 fix web ui template 2022-07-05 22:15:11 -06:00
..
cjs fix web ui template 2022-07-05 22:15:11 -06:00
umd fix web ui template 2022-07-05 22:15:11 -06:00
LICENSE fix web ui template 2022-07-05 22:15:11 -06:00
README.md fix web ui template 2022-07-05 22:15:11 -06:00
build-info.json fix web ui template 2022-07-05 22:15:11 -06:00
index.js fix web ui template 2022-07-05 22:15:11 -06:00
package.json fix web ui template 2022-07-05 22:15:11 -06:00
profiling.js fix web ui template 2022-07-05 22:15:11 -06:00
server.browser.js fix web ui template 2022-07-05 22:15:11 -06:00
server.js fix web ui template 2022-07-05 22:15:11 -06:00
server.node.js fix web ui template 2022-07-05 22:15:11 -06:00
test-utils.js fix web ui template 2022-07-05 22:15:11 -06: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