Odonno / ReduxSimple

Simple Stupid Redux Store using Reactive Extensions
http://www.nuget.org/packages/ReduxSimple/
MIT License
144 stars 20 forks source link

Effects with async / Task support ? #84

Closed RockNHawk closed 3 years ago

RockNHawk commented 3 years ago

Hi,

I needs do some API call / DB Operation in effects, does this library supports effects with Task ?

Odonno commented 3 years ago

Hi @RockNHawk

Of course. First, you need to know that this lib is using Rx.NET. So you will work a lot with the concept of Observable. So, in order to use effects, you need to provide Observable.

So, if you make API calls with Task, which is natural. You need first to convert these methods to Observable.

And if you want some code, here it is on the Sample project: https://github.com/Odonno/ReduxSimple/blob/master/ReduxSimple.Uwp.Samples/Pokedex/Effects.cs

Feel free to ask additional questions if you want. :)