Skip to content

An invasive web app architecture disguised as a framework.

Notifications You must be signed in to change notification settings

quexxon/starling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Starling

Starling is a set of architectural conventions for building web apps, disguised as a framework. It is primarily inspired by The Elm Architecture, but the concepts map fairly directly to an opinionated subset of React. If you squint, Starling is like a naive React (plus Redux) without life-cycle methods, component state, or JSX.

Getting Started

Run the following commands:

npm install
npm run build

Load the resulting file (dist/starling.min.js) prior to your own to add Starling to the global namespace. For a small sample application, check out the example directory.

API

Starling exposes three functions bound to starling in the global namespace (the current build targets the browser).

starling.createApp

Bootstraps a Starling application. createApp takes as its arguments three functions (init, update, view) that form the backbone of Starling's (stolen) architectural conventions. See the sample application for more information.

Usage

const container = document.getElementById('app');
starling.createApp(init, update, view).embed(container);

starling.newAction

Register a new action. This is how you make things happen in Starling. See the sample application for more information.

Usage

// starling.newAction : ( String, ?Object = {} ) -> ()
starling.newAction('SET_INTERVAL', { value: 5 });

starling.h

Conveniently exposes virtual-dom/h. Read its documentation here.

About

An invasive web app architecture disguised as a framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published