-
Changed:
FormAction
andReducer.form
have been renamed toBindingAction
andReducer.binding
based on community feedback and the more general, non-form-based use cases. Migration path:FormAction
andReducer.form
have been deprecated and Xcode can automatically migrate them to their newer names.// before: enum SettingsAction { case form(FormAction<SettingsState>) } let settingsReducer = Reducer< SettingsState, SettingsAction, SettingsEnvironment > { state, action, environment in switch action { ... case .form: return .none } } . form(action: /SettingsAction.form) TextField( "Display name", text: viewStore.binding(keyPath: \.displayName, send: SettingsAction.form) ) // after: enum SettingsAction { case binding(BindingAction<SettingsState>) } let settingsReducer = Reducer< SettingsState, SettingsAction, SettingsEnvironment > { state, action, environment in switch action { ... case .binding: return .none } } .binding(action: /SettingsAction.binding) TextField( "Display name", text: viewStore.binding(keyPath: \.displayName, send: SettingsAction.binding) )