azalea
a light-weight and pure javascript framework.
Getting started
Installation
npm install --save azalea
Examples
- azalea-skeleton simple azalea skeleton using webpack
- azalea-todomvc todomvc example implemented using azalea
- azalea-threaditjs threaditjs implemented using azalea
- json-to-csv inspect json to csv
Core concepts
- context
- component
- route
Context
- a plain javascript object
- application level state
Component
- a plain javascript function
function (element, context, render) {}
. element
isDOM Element
context
isContext
, the application level staterender' is
Function`, no arguments, will rerun every component againelement.onunload
isFunction?
, defined it to destroy the third party plugins or something elseelement.onupdate
isFunction?
, defined it to call element.onupdate instead of component
Route
route
is a plain javascript objectroute.name
isString
route.path
isString
, to match the window.location.hashroute.before
isFunction | [Function] | {Function}
, accept return value isPromise
, often used to prefetch dataroute.after
isFunction | [Function] | {Function}
, the same asroute.before
Contribution
since azalea is trying to provide only the minimal essential tools to develop an web application, all pull requests with this consideration will be glad to accept.
Test
npm test
License
ISC