Fluxor is a zero boilerplate Flux/Redux library for Microsoft .NET and Blazor.
MIT License
Bot releases are visible (Hide)
Published by mrpmorris 5 months ago
UseReduxDevTools
no longer ensures UseRouting
is called (#360)UseReduxDevTools
no longer requires Newtonsoft.Json
(#386)UseReduxDevTools
no longer ensures UseRouting
is called (#360)UseReduxDevTools
no longer requires Newtonsoft.Json
(#386)Published by mrpmorris 7 months ago
Published by mrpmorris over 2 years ago
IDispatcher
now queues actions whenever there are no subscribers to the ActionDispatched
event and then dequeues them when a subscriber is added (#301)Published by mrpmorris over 2 years ago
EnableStackTrace
on ReduxDevToolsMiddlewareOptions
to enable passing stack trace to the browser plugin #262Published by mrpmorris over 2 years ago
IStateSelection<TState, TValue>
bug that threw exception stating the selector hasAction<TValue> selectedValueChanged
to IStateSelection<TState, TValue>.Select
event EventHandler<TValue> SelectedValueChanged
to IStateSelection<TState, TValue>
for stronglyPublished by mrpmorris almost 3 years ago
Published by mrpmorris almost 3 years ago
Published by mrpmorris almost 3 years ago
[FeatureState]
attribute to avoid having to create Feature<T>
descendant classes. (#204)FluxorOptions.ScanTypes
to allow scanning of specified classes. (#214)FluxorComponent
and FluxorLayout
abstract. (#217)ForceLoad
property to GoAction
. (#178)Dispose(bool disposing)
if not already exposed. (#222)Published by mrpmorris over 3 years ago
Published by mrpmorris over 3 years ago
Published by mrpmorris almost 4 years ago
Published by mrpmorris almost 4 years ago
public class SomeEffects
{
[EffectMethod(typeof(RefreshDataAction))]
public Task CallItWhateverYouLike(IDispatcher dispatcher)
{
... code here ...
}
// is equivalent to
[EffectMethod]
public Task CallItWhateverYouLike(RefreshDataAction unusedParameter, IDispatcher dispatcher)
{
... code here ...
}
}
public class SomeReducers
{
[ReducerMethod(typeof(IncrementCounterAction))]
public MyState CallItWhateverYouLike(MyState state) =>
new MyState(state.Count + 1);
// is equivalent to
[ReducerMethod]
public MyState CallItWhateverYouLike(MyState state, IncrementCounterAction unusedParameter) =>
new MyState(state.Count + 1);
}
public class TestIntReducer: AbstractGenericStateReducers<int>
{
}
public class TestStringReducer: AbstractGenericStateReducers<string>
{
}
public abstract class AbstractGenericStateReducers<T>
where T : IEquatable<T>
{
[ReducerMethod]
public static TestState<T> ReduceRemoveItemAction(TestState<T> state, RemoveItemAction<T> action) =>
new TestState<T>(state.Items.Where(x => !x.Equals(action.Item)).ToArray());
}
public class GenericEffectClassForMyAction : AbstractGenericEffectClass<MyAction>
{
public GenericEffectClassForMyAction(SomeService someService) : base(someService)
{
}
}
public class GenericEffectClassForAnotherAction : AbstractGenericEffectClass<AnotherAction>
{
public GenericEffectClassForAnotherAction(SomeService someService) : base(someService)
{
}
}
public abstract class AbstractGenericEffectClass<T>
{
private readonly ISomeService SomeService;
protected AbstractGenericEffectClass(ISomeService someService)
{
SomeService = someService;
}
[EffectMethod]
public Task HandleTheActionAsync(T action, IDispatcher dispatcher)
{
return SomeService.DoSomethingAsync(action);
}
}
Published by mrpmorris about 4 years ago
FluxorComponent
or FluxorLayout
has been inherited and the descendant doesn't call base.OnInitialized()
.