![]() |
VOOZH | about |
dotnet add package ReduxSimple --version 3.7.0
NuGet\Install-Package ReduxSimple -Version 3.7.0
<PackageReference Include="ReduxSimple" Version="3.7.0" />
<PackageVersion Include="ReduxSimple" Version="3.7.0" />Directory.Packages.props
<PackageReference Include="ReduxSimple" />Project file
paket add ReduxSimple --version 3.7.0
#r "nuget: ReduxSimple, 3.7.0"
#:package ReduxSimple@3.7.0
#addin nuget:?package=ReduxSimple&version=3.7.0Install as a Cake Addin
#tool nuget:?package=ReduxSimple&version=3.7.0Install as a Cake Tool
Simple Stupid Redux Store using Reactive Extensions
Redux Simple is a .NET library based on Redux principle. Redux Simple is written with Rx.NET and built with the minimum of code you need to scale your whatever .NET application you want to design.
There is a sample UWP application to show how ReduxSimple library can be used and the steps required to make a C#/XAML application using the Redux pattern.
You can follow this link: https://www.microsoft.com/store/apps/9PDBXGFZCVMS
Like the original Redux library, you will have to initialize a new State when creating a Store + you will create Reducer functions each linked to an Action which will possibly update this State.
In your app, you can:
Dispatch new Action to change the StateSubscribe methodYou will need to follow the following steps to create your own Redux Store:
State definitionpublic record RootState
{
public string CurrentPage { get; set; } = string.Empty;
public ImmutableArray<string> Pages { get; set; } = ImmutableArray<string>.Empty;
}
Each State should be immutable. That's why we prefer to use immutable types for each property of the State.
Action definitionspublic class NavigateAction
{
public string PageName { get; set; }
}
public class GoBackAction { }
public class ResetAction { }
Reducer functionspublic static class Reducers
{
public static IEnumerable<On<RootState>> CreateReducers()
{
return new List<On<RootState>>
{
On<NavigateAction, RootState>(
(state, action) => state with { Pages = state.Pages.Add(action.PageName) }
),
On<GoBackAction, RootState>(
state =>
{
var newPages = state.Pages.RemoveAt(state.Pages.Length - 1);
return state with {
CurrentPage = newPages.LastOrDefault(),
Pages = newPages
};
}
),
On<ResetAction, RootState>(
state => state with {
CurrentPage = string.Empty,
Pages = ImmutableArray<string>.Empty
}
)
};
}
}
sealed partial class App
{
public static readonly ReduxStore<RootState> Store;
static App()
{
Store = new ReduxStore<RootState>(CreateReducers());
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on ReduxSimple:
| Package | Downloads |
|---|---|
|
ReduxSimple.Entity
Simple Stupid Redux Store using Reactive Extensions |
|
|
Rownd.Xamarin
Integrate simple, frictionless authentication into your Xamarin app. |
|
|
ReduxSimple.DevTools
Simple Stupid Redux Store using Reactive Extensions |
|
|
ReduxSimple.Uwp.DevTools
Simple Stupid Redux Store using Reactive Extensions - DevTools for UWP applications |
|
|
ReduxSimple.Uwp.RouterStore
Simple Stupid Redux Store using Reactive Extensions - Binding between Store and Routing in UWP applications |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.7.0 | 31,500 | 12/20/2021 |
| 3.6.1 | 5,629 | 4/19/2021 |
| 3.6.0 | 1,374 | 2/15/2021 |
| 3.5.2 | 1,233 | 1/13/2021 |
| 3.5.1 | 3,929 | 10/16/2020 |
| 3.5.0 | 770 | 10/10/2020 |
| 3.4.0 | 2,322 | 4/24/2020 |
| 3.3.0 | 781 | 4/16/2020 |
| 3.2.0 | 821 | 4/16/2020 |
| 3.1.0 | 901 | 2/26/2020 |
| 3.0.1 | 964 | 1/25/2020 |
| 3.0.0 | 916 | 11/11/2019 |
| 2.1.0 | 887 | 9/9/2019 |
| 2.0.1 | 3,493 | 5/30/2019 |
| 2.0.0 | 2,704 | 12/22/2018 |
| 1.2.0 | 1,547 | 5/21/2018 |
| 1.1.1 | 1,520 | 4/29/2018 |
| 1.1.0 | 1,703 | 4/28/2018 |
| 1.0.0 | 1,875 | 1/22/2018 |