@source4society/react-scepter-redux-app
v1.1.2
Published
A universal app container that configures a connection to a redux store and react-router
Downloads
8
Readme
react-scepter-redux-app
A universal app container that configures a connection to a redux store and react-router
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.