1.1.2 • Published 6 years ago

@source4society/react-scepter-redux-app v1.1.2

Weekly downloads
1
License
AGPL-3.0
Repository
github
Last release
6 years ago

react-scepter-redux-app

A universal app container that configures a connection to a redux store and react-router

scepter-logo

redux-logo

airbnb-codestyle

Build Status

codecov

Installation

npm install @source4society/react-scepter-redux-app

or

yarn add @source4society/react-scepter-redux-app

In your primary application file, whether it is a mobile or web application, pass this component as the primary component with history created from an appropriate history object (see history) and MyApp containing app specific custom logic.

For example, a web application would be setup the following way in app.js:

const render = () => {
  ReactDOM.render(
    <ScepterReduxApp history={history} MyApp={MyApp} />,
    MOUNT_NODE
  );
};

A mobile application in App.js

// @flow
type Props = {};
export default class App extends Component<Props> { // eslint-disable-line react/prefer-stateless-function
  render() {
    return (
      <ScepterReduxApp history={history} MyApp={MyApp} />
    );
  }
}

environment specific components should be injected as props.