UI with ReactJS and ImmutableJS

From Genecats
Revision as of 21:13, 12 January 2015 by AngieHinrichs (talk | contribs) (initial outline)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Background

Evolution of Javascript in kent/src

Before JS: just the CGI

JS inlined in HTML

AJAX and JQuery: manipulating the DOM

MV*

An abandoned experiment

ReactJS & JSX

Simplicity of top-down render, made efficient

JSX: HTML-ish with the power of JS

Lifecycle methods of React components

React mixins

The Flux architecture: why not?

ImmutableJS

The new architecture

Bootstrapping: the CGI prints minimal HTML

ImModel: monolithic UI state model using ImmutableJS

Handling user actions

Handling AJAX responses

Undo and redo

ImModel mixins

View: React components using ImmutableJS

Avoid internal state when possible

Using UI state from ImModel

Passing user actions to ImModel

JQueryUi: oil & water with React, but still too useful to drop

The CGI speaks JSON now