1.1.1 • Published 6 years ago

react-server-status v1.1.1

Weekly downloads
33
License
MIT
Repository
github
Last release
6 years ago

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;
/// …
1.1.1

6 years ago

1.1.0

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago