Hello Swift devs! This week I've open-sourced Firestarter, a framework designed to overcome the challenges one has when building large scale apps with SwiftUI (but it could also work great in other contexts, like CLI apps or even server apps).
The main idea behind it is that views should never update the state directly, but fire events (called Action
s in Firestarter
) that get processed by consumers (called Worker
s in Firestarter
), which are responsible for business logic and updating the state.
The approach is certainly not new, it's similar to Redux, Flux or even conceptually with microservices. However, it does work really well with SwiftUI: by fully decoupling views from the models it makes apps easy to debug, test, and develop.
Also, there are other goodies included, like middlewares, action history, the possibility to redirect/block/postpone an action and action flows.
I'm at the second app developed while using it, so, I'm also on the lookout for other features that might prove useful. Have a look, any feedback highly appreciated!