react-dom
    Overview
    Documentation
    Tutorials
    Chat
    Insights
    Code
    Dependencies
    Contributors
    Jobs

react-dom

React package for working with the DOM.

16.9.0  •  Updated 9 months ago  •  by facebook  •  MIT License

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

Popularity

Weekly Downloads
Add this graph to GitHub
4.8M

Maintenance

Development

Last ver 10 months ago
Created 6 years ago
Last commit 1 month ago
6 hours between commits

Technology

Node version: 10.14.2
3102.5K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

114 contributors
Brian Vaughn
247 commits, 142 merges, 103 PRs
Works at facebook
Dominic Gannaway
175 commits, 179 merges, 190 PRs
Works at facebook
Dan Abramov
113 commits, 117 merges, 105 PRs
Works at facebook
Sebastian Markbåge
116 commits, 102 merges, 113 PRs
Works at Facebook
Andrew Clark
118 commits, 91 merges, 117 PRs
Works at facebook
Nicolas Gallagher
40 commits, 40 merges, 36 PRs
Works at Facebook

Tags

react
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookTwitterLinkedIn
© 2020 Devstore, Inc.