module Rooibos::Router
Fractal routing DSL for composing hierarchical updates.
A growing app accumulates message-handling logic. One Update handles dozens of cases. Model fields multiply. View code sprawls.
Include Router in a fragment module. It decomposes your Update into declarative rules: routes bind nested fragments to model slices, forwards route messages inward, receives handle them exclusively, and observers process without stopping the flow.
Use it to build tab containers, panel layouts, or any hierarchy where messages flow inward through nested fragments.
Example
module Dashboard include Rooibos::Router route :sidebar, to: Sidebar route :main, to: MainPanel receive_events :ctrl_c, :quit action :quit, -> { Rooibos::Command.exit } forward_events :enter, to: :main, as: :submit otherwise route_to: :main Update = from_router end