Overworld
Meta flux framework for real application.
CAUTION!!
This is under development with dog fooding by myself.
All API is unstable.
Features
- Context transition on stack
- History with Cache
- TypeScript friendly
- CoffeeScript friendly
- Headless friendly
Dependencies
- React
- Promise
Examples
global = windowglobal.Promise = require 'bluebird' # need something promise global.React = require 'react'Overworld = require 'overworld' @component: ReactcreateClass mixins: OverworldEmittable : -> # This has this.props.emitter @emit 'main:update'DatenowtoString : -> ReactcreateElement 'div' ReactcreateElement 'h1''App' ReactcreateElement 'button'key: '1'onClick: @onClick'click me' ReactcreateElement 'p'key: '2'@propsbody @aggregator: : : body: 'stamp: '+statetimestamp : subscribe 'main:update' contextupdate timestamp portal = portallink 'hello'HelloContext windowaddEventListener 'load'-> portalmountdocumentbody portaltransition'hello'timestamp: 'foo'
API Documents
Warding and role
- Props : immutable params given at initialization
- State : mutable params created by context
- TemplateProps : params to be given to Component
Overworld.Portal
// Associate name and context : void; // mount it on HTMLElement : void; // transition to associated context by name : Thenable<any>;
Overworld.Context
<Props State> props: Props; state: State; : void; : void; : void;
Overworld.IAggregator
interface IAggregator<Props State TemplateProps> // Initialize state with props : State | Thenable<State>; // Build template properties with state and props. // Result of this will `setProps` to React component. : TemplateProps | Thenable<TemplateProps>;
Overworld.Emittable
Mixin for react class.
Overworld.LifeCycle
- CREATED
- PAUSED
- RESUMED
- PAUSED
TODO
- Enhance disposing by context switching