react-server-status
1.1.1 • Public • Published react-server-status
Based on https://github.com/gaearon/react-side-effect
Install
$ npm install --save react-server-status
Example
React View
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
import React from 'react';
import { renderToString } from 'react-dom/server';
import ServerStatus from 'server-status';
const page = renderToString(<App />);
this.status = ServerStatus.rewind() || 200;
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
1.1.1 | 2 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.1.1 | 2 | |
1.1.0 | 0 | |
1.0.2 | 0 | |
1.0.1 | 0 | |
1.0.0 | 0 | |
Package Sidebar
Install
npm i react-server-status
Weekly Downloads