Constconst Counter = Logix.ModuleTag.make("Counter", {
state: CounterState,
actions: CounterActions,
reducers: {
inc: Logix.ModuleTag.Reducer.mutate((draft, _payload) => {
draft.count += 1
}),
},
})
yield* $.reducer(
"setValue",
Logix.ModuleTag.Reducer.mutate((draft, payload) => {
draft.value = payload
}),
)
Reducer helper:
Reducer.mutateprovides the same mutative style as$.state.mutate.(state, action) => state.