-
Notifications
You must be signed in to change notification settings - Fork 1
FAQ
SwiftState is designed for Swift and SwiftUI. The store itself is not a view, but SwiftUI gets first-class helpers such as ObservableObject, @Published state, and Binding support.
Use Store for normal production state management.
Use TimeTravelStore while developing when you want undo, redo, jump, and debugger history.
Yes. Use EffectReducer and return .run { dispatch in ... } for async work.
No. If a reducer ignores an action and state stays equal, TimeTravelStore does not record a new history item.
Keep API clients outside state. Inject them into reducer construction or capture them in the effect reducer closure.
Yes. Use combineReducers, combineEffectReducers, and pullback.
SwiftState keeps the root store generic over state while actions conform to a shared Action protocol. Reducers cast only the actions they understand and ignore the rest.
Not yet. Async effects are intentionally small and simple today. Cancellation by ID is a good future enhancement.