Server render the main page

Also, add hashes to asset file names and use the "entry manifest" plugin
in dev to get auto-reloading.
This commit is contained in:
Michael Jackson
2019-01-12 19:27:28 -08:00
parent 45c48cba26
commit 09914c1db4
176 changed files with 2725 additions and 119822 deletions

View File

@ -1,54 +0,0 @@
# `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
```sh
npm install react react-dom
```
## Usage
### In the browser
```js
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
```js
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`