This document summarizes techniques for robust UI development with ClojureScript including:
- ClojureScript enables first-class immutability and persistent data structures which helps manage increasingly complex state in single-page apps.
- The reagent library separates state (stored in atoms) and views (functions of state) allowing hot code reloading to change views without losing state.
- The re-frame library takes this further with a single state container (the database) and separating events, event handlers, effects, and subscriptions to control mutation and side effects predictably.
- Clojure.spec can specify and validate the application state at runtime to catch errors and provide helpful messages.