storybooks/mantra-core

Name: mantra-core

Owner: Storybook

Description: Deprecated - for bug fixes and maintenance only

Forked from: mantrajs/mantra-core

Created: 2017-11-15 16:25:21.0

Updated: 2018-05-18 15:55:48.0

Pushed: 2017-11-15 17:13:13.0

Homepage:

Size: 27

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

mantra-core

Core API for Mantra.

Introduction

This repo contains the core APP api where we create an mantra app and initialize it.

Also, this package contains exported functions from both react-komposer and react-simple-di. That's purely for the ease of use.

Installation
i --save mantra-core react
App API
rt MyComp from './myComp';
rt {createApp} from 'mantra-core';

ere's a simple Mantra Module
t module = {
utes(injectDeps) {
const InjectedComp = injectDeps(MyComp);
// load routes and put `InjectedComp` to the screen.

ad(context, actions) {
// do any module initialization

tions: {
myNamespace: {
  doSomething: (context, arg1) => {}
}



t context = {
ient: new DataClient()


t app = createApp(context);
loadModule(module);
pp.loadModule(someOtherModule);
init();

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.