Structured Re-Frame

Structured Re-Frame

Structure and reusable components in reframe

what do you need to write composable and modular reframe code?

To create reusable building blocks and reframe

You have to keep in mind the picture of unidirectional flow of data. Speaking very roughly, you change the state of the application by dispatching events and then you use subscriptions to build the UI (or derivative state). So:

  • events in <-
  • subscriptions out ->


This is how structure my client-side apps now:

  • lib (shared, reusable code)
  • core data events and subs
  • module-a (depends on core), provides UI
  • module-b (depends on core)
  • UI facade – joins the UI of all the modules, using a very narrow layer of its own subscriptions



Since this came up recently 

https://vvvvalvalval.github.io/posts/clojure-key-namespacing-convention-considered-harmful.html