react-dom
    Overview
    Documentation
    Insights
    Code
    Contributors
    Dependencies
    Alternatives

react-dom

React package for working with the DOM.

16.9.0  •  Published 3 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
4.8M
Stars
139.5K

Maintenance

Development

Last ver 3 months ago
Created 6 years ago
Last commit 2 days ago
5 hours between commits

Technology

Node version: 10.14.2
3102.5K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

84 contributors
Brian Vaughn
396 commits, 64 merges, 57 PRs
Works at facebook
Dominic Gannaway
159 commits, 222 merges, 215 PRs
Works at facebook
Andrew Clark
116 commits, 122 merges, 142 PRs
Works at facebook
Dan Abramov
81 commits, 82 merges, 80 PRs
Works at facebook
Sebastian Markbåge
56 commits, 64 merges, 65 PRs
Works at Facebook
Nicolas Gallagher
41 commits, 66 merges, 80 PRs
Works at Facebook

Tags

react
Ready for the next level?
Join Devstore's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
© 2019 Devstore, Inc.
Devstore helps developers find and use open-source packages, so they can focus on building amazing things