# react-server-status

> A declarative way to set server status

Latest version **1.1.1** (published 2018-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-server-status
pnpm add react-server-status
yarn add react-server-status
bun add react-server-status
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-02-08 |
| First published | 2015-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | VG |
| Maintainers | dlmr |

## Links

- npm: https://www.npmjs.com/package/react-server-status
- Repository: https://github.com/vgno/react-server-status
- Homepage: https://github.com/vgno/react-server-status#readme
- Issues: https://github.com/vgno/react-server-status/issues
- npm.io page: https://npm.io/package/react-server-status

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.5.8
- [react-side-effect](https://npm.io/package/react-side-effect.md) ~1.1.0

## Recent versions

- 1.1.1 (latest) — 2018-02-08
- 1.1.0 — 2017-04-20
- 1.0.2 — 2015-11-24
- 1.0.1 — 2015-11-24
- 1.0.0 — 2015-11-23

## README

# react-server-status

Based on https://github.com/gaearon/react-side-effect

## Install

`$ npm install --save react-server-status`

## Example

### React View
```javascript
import React, { Component } from 'react';

import ServerStatus from 'react-server-status';

export default class GenericView extends Component {
    render() {
        return (
            <ServerStatus status={ 500 }>
                <div>Some content</div>
            </ServerStatus>
        );
    }
}
```

### Server
```javascript
// …
import React from 'react';
import { renderToString } from 'react-dom/server';
import ServerStatus from 'server-status';
// …
const page = renderToString(<App />);
this.status = ServerStatus.rewind() || 200;
/// …
```

---
_Source: https://npm.io/package/react-server-status · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
