Suas is a unidirectional data flow architecture implementation for iOS/macOS/tvOS/watchOS and Android heavily inspired by Redux. It provides an easy-to-use library that helps to create applications that are consistent, deterministic, and scalable.
Suas focuses on providing good developer experience and tooling such as customizable logging and state changes monitoring.
Suas architecture is composed of five core elements:
- Store: main component that contains a Reducer (or set of reducers), and the main application State. Listeners subscribe to it for state changes. Actions that cause state changes are dispatched to it.
- State: defines the state of a component/screen or group of components/screens.
- Action: each action specifies a change we want to effect on the state.
- Reducer: contains the logic to alter the state based on a specific action received.
- Listener: callback that gets notified when the state changes.
SDK for Android
Add a method to the store for registering an action listener.