Actions
Actions are used to express intended state changes. Actions don’t contain functions, instead they provide information about the intended state change, e.g. which user should be deleted.
In your ReSwift app you will define actions for every possible state change that can happen.
Reducers handle these actions and implement state changes based on the information they provide.
All actions in ReSwift conform to the Action
protocol, which currently is just a marker protocol.
-
All actions that want to be able to be dispatched to a store need to conform to this protocol Currently it is just a marker protocol with no requirements.
Declaration
Swift
public protocol Action
-
Initial Action that is dispatched as soon as the store is created. Reducers respond to this action by configuring their initial state.
Declaration
Swift
public struct ReSwiftInit : Action