Releases: mrpmorris/Fluxor
Releases · mrpmorris/Fluxor
4.0
Support .NET 5.0
Release/3.9 (#133) * Support .NET Standard 2.0 (Fixes #122) * Update * Update readme for 3.9
3.8
- Allow state notification throttling to reduce time spent rendering (#114) - see:
- FluxorComponent.MaximumStateChangedNotificationsPerSecond
- FluxorLayout.MaximumStateChangedNotificationsPerSecond
- Feature.MaximumStateChangedNotificationsPerSecond
- Fix for (#105) - Allow FluxorComponent descendents to dispatch actions when overriding Dispose(bool).
- Added an optional actionType to [EffectMethod] to avoid compiler warnings when the action is not used
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 ...
}
}
- Added an optional actionType to [ReducerMethod] to avoid compiler warnings when the action is not used
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);
}
- Added support for declaring [ReducerMethod] on generic classes
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());
}
- Added support for declaring [EffectMethod] on generic classes
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);
}
}
3.7
- Fix for #84 - Allow observer to unsubscribe from all subscriptions whilst executing the callback from a previous subscription
- Fix for #82 - Throw an informative exception when
FluxorComponent
orFluxorLayout
has been inherited and the descendant doesn't callbase.OnInitialized()
. - Fix for #87 - Exception thrown initialising store in .NET 5.
- Include ActionSubscriber tutorial in solution
3.6
3.5
3.4
3.3
- Breaking change: EffectMethod and ReducerMethod decorated methods must now be public - although they can be methods of internal classes.
- New IActionSubscriber to receive notifications before actions are reduced into state and before Effects are triggered
- More speed improvements in options.ScanAssemblies
- Subscriptions to the StateChanged event will now be triggered before FluxorComponent/FluxorLayout notified of changes (so manual subscriptions are executed before rendering)
- Added link with more information for when DisposableCallback throws an error because it has not been disposed
3.2
3.1.1
- Fixed bug that caused exception when using
.ConfigureAwait
in an Effect (#20) - Ensured add/remove on events are thread safe (#23)
- Made it easier to find the source of DisposableCallback instances that are not disposed (#24)
- State properties were not discovered if they were declared as private in a base class (#25)
- Handle disposing of partially created DisposableAction (#29)