Question: Why put async call in the ActionCreator
Closed this issue · 2 comments
Hi @torhovland
I was wondering about your decision to put an aync call in https://github.com/torhovland/blazor-redux/blob/master/samples/BlazorStandalone/ActionCreators.cs ?
In redux, I would most likely use something like redux-saga to implement an async action. While I understand that adding the concept of sagas might be overkill, do you think there might be another location to place the async calls while keeping ActionCreator pure?
Hi, @chanan
I have basically followed the pattern of Async Action Creators, as outlined here:
https://redux.js.org/advanced/async-actions
I'm interested in looking more into redux-saga and other middleware to see how they would apply to Blazor, so things might change. But for now I think using Async Action Creators is a nice solution.
The new System.Threading.Channels might be fun to try.