Inject App API

Marty.injectApp(Component) adds a property to the component prototype to make the application instance available at this.app.

class User extends React.Component {
  saveFoo() {
    this.app.fooActions.saveFoo();
  }

  deleteBar() {
    this.app.barActions.deleteBar();
  }
})

Marty.injectApp(User);