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
Size: 27
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Core API for Mantra.
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.
i --save mantra-core react
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();