Component

Components in Bow Arch put everything together. They manage to render a State in a View, which eventually produces Inputs, that are transformed by a Dispatcher into actions that modify the state, closing the loop. This is a unidirectional loop where each artifact has clear responsibilities and are build in a purely functional manner. That way, everything is easy to manage, can be tested in isolation, and is highly composable.

Components are parameterized with four types:

Therefore, to create a component, you need to provide:

From this initial configuration, it will handle state changes and updates to the UI as a black box. Components conform to SwiftUI View, so they can be used as part of other views, or as the root view of a UIHostingController.