Skip to content

Instantly share code, notes, and snippets.

@KevinAst
Created February 13, 2018 19:35
Show Gist options
  • Save KevinAst/8ab513c120e4c9c74b13b24f08c7733d to your computer and use it in GitHub Desktop.
Save KevinAst/8ab513c120e4c9c74b13b24f08c7733d to your computer and use it in GitHub Desktop.
Sample feature-u src/app.js
import ReactDOM from 'react-dom';
import {launchApp} from 'feature-u';
import {reducerAspect} from 'feature-redux';
import {logicAspect} from 'feature-redux-logic';
import {routeAspect} from 'feature-router';
import features from './feature';
// launch our app, exposing the App object (facilitating cross-feature communication)
export default launchApp({ // *4*
aspects: [ // *1*
reducerAspect, // redux ... extending: Feature.reducer
logicAspect, // redux-logic ... extending: Feature.logic
routeAspect, // Feature Routes ... extending: Feature.route
],
features, // *2*
registerRootAppElm(rootAppElm) { // *3*
ReactDOM.render(rootAppElm,
getElementById('myAppRoot'));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment