react-dom
    Overview
    Documentation
    Insights
    Code
    Contributors
    Dependencies
    Alternatives

react-dom

React package for working with the DOM.

16.9.0  •  Published 2 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
We are hiring frontend and backend developers!
Come and help us build the ultimate open source directory 🔥

Popularity

Weekly Downloads
4.8M
Stars
133.5K

Maintenance

Development

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

Technology

Node version: 10.14.2
3102.5K unpacked

Legal and Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

145 contributors
zpao
294 merges, 56 PRs
Dan Abramov
Maintainer, 210 commits, 2 PRs
Works at facebook
Andrew Clark
Maintainer, 167 commits
Works at facebook
Dominic Gannaway
140 commits
Works at facebook
petehunt
127 merges, 54 PRs
Brian Vaughn
Maintainer, 121 commits
Works at facebook

Tags

react
© 2019 Devstore, Inc.
Devstore helps developers find and use open-source packages, so they can focus on building amazing things