The Front-End Client is a Single-Page Application. written in awesome ES6 Javascript with Babeljs. Written with the spiffiest of web components, using Deku.
-
Babeljs: Learn the ES6 Javascript Syntax. ES6 Playground
-
Deku: Front End Components. Add a component to Klouds - Docs
<Page>...</Page>
inside JS
https://github.com/dekujs/deku
(x) => x * 5
https://babeljs.io/docs/learn-es2015/#arrows
'let' is the same as 'var'
let { state, props } = component;
https://babeljs.io/docs/learn-es2015/#destructuring
import
and export
https://babeljs.io/docs/learn-es2015/#modules
yield
and function* ()
https://github.com/tj/co -- cleaner than promises
No reloading, No changing pages.
The app logic is separated as such.
/app.js
creates some /elements
/app.js
sets some global states app.set(/* tree */)
/app.js
imports some /events.js
to react to /elements/*.js
events.
/events.js
makes some calls to /lib/api.js
, the lib that talks to the server.
/app.js
renders it into the page.