textEditingReducer top-level property
A pre-built reducer for simple text state managed by a TextEditingControllerBuilder.
Updates the String state when a TextEditingActionEdit is received
with a different text value.
Implementation
final textEditingReducer = Reducer<String, TextEditingAction, EmptyEnvironment>.transform(
(state, action, env) => switch (action) {
TextEditingActionEdit(:final text) when text != state => text,
_ => state,
},
);