In a recent Clojure Developers Barcelona event we did the Lights Out Kata in ClojureScript using Reagent (a minimalistic ClojureScript interface to React.js) and Figwheel (which builds your ClojureScript code and hot loads it into the browser as you are coding).
We did mob programming and REPL-driven development.
Once at home I went on working on the kata.
This is the resulting code:
First, the core namespace where everything is initialized:
The lights-view namespace which contains the code to render all the components:
Finally, the lights namespace which contains all the business logic:
You can check all the code in the everything-in-client branch of this GitHub repository.
As usual it was a great pleasure to do mob programming with the members of Clojure Developers Barcelona.
Thanks!
No comments:
Post a Comment