- Breaking change: Remove support for obsolete versions of .NET framework (#384)
- Breaking change: Replace IDisposable with IAsyncDisposable in Blazor components (#324)
- Breaking change:
UseReduxDevTools
no longer ensuresUseRouting
is called (#360) - Breaking change:
UseReduxDevTools
no longer requiresNewtonsoft.Json
(#386) - Support Action Filtering in Redux Dev Tools (#383)
- Do not consider anchor (Uri.Fragment) when checking Uri for changes in routing middleware (#455)
- Adds additional useful information to exception thrown by
DisposableAction
(#425) - Fix deadlock scenario when dispatching actions from an effect triggered by store activation (#426)
- Fixes potential for deadlock (#407)## New in 5.7
- Fixes memory leak when using
ActionSubscriber
orSubscribeToAction
(#378)
- Support .NET 7
- Ensure StateSelection unsubscribes properly (#353)
DisposableCallback
includes Caller info when throwing an exception (#320)- Ensured initialising the store does not overwrite manually set state (#347)
- ActionSubscribers are now notified after state has been reduced (#299)
- Routing middleware will no longer dispatch a GoAction when URl is the same value but formatted differently (#297)
IDispatcher
now queues actions whenever there are no subscribers to theActionDispatched
event and then dequeues them when a subscriber is added (#301)
- New method EnableStackTrace on ReduxDevToolsMiddlewareOptions to enable passing stack trace to the browser plugin (#262)
- ActionSubscriber demo
- Add LifeCycle to FluxorOptions and use in registration (#287)
- Added Stack Trace option for Redux Dev Tools (#262)
- Fixed
IStateSelection<TState, TValue>
bug that threw exception stating the selector has already been set. (#252) - Added an optional
Action<TValue> selectedValueChanged
toIStateSelection<TState, TValue>.Select
that is executed whenever the selected value changes. This is a convenient alternative to hooking up event handlers. - Added
event EventHandler<TValue> SelectedValueChanged
toIStateSelection<TState, TValue>
for strongly typed event args when the selected value changes. - Changed to avoid .net memory leak in dependency injection (#271)
- Breaking change: Removed need to reference
_content/Fluxor.Blazor.Web/scripts/index.js
(#235) - Breaking change: Removed
IState<TState>
genericStateChanged
event. - Separated
IDispatcher
out ofIStore
. (#209) - Added
IState<TState>
alternativeIStateSelector<TState, TValue>
for selecting and subscribing to subsets of state. (#221) - Made actions that are a generic type human readable in ReduxDevTools. (#205)
- Support .NET 6
- New
[FeatureState]
attribute to avoid having to createFeature<T>
descendant classes. (#204) - Add
FluxorOptions.ScanTypes
to allow scanning of specified classes. (#214) - Make
FluxorComponent
andFluxorLayout
abstract. (#217) - Add
ForceLoad
property toGoAction
. (#178) - Only call
Dispose(bool disposing)
if not already disposed. (#222)
- Allow custom control over JSON serialisation in Redux Dev Tools - see Redux Dev Tools docs.
- Changed
Effect<T>.HandleAsync
fromprotected
topublic
to make unit testing easier - Added
Options
to.UseReduxDevTools()
middleware extension
- Support added for .NET 5.0
- 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);
}
}
- 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 (#77) - Exception thrown initialising store in .NET 5.
- Ensure synchronous effects are executed synchronously (#76) - Reverts changes for (#74) Endless loop redirects as these are no longer occur.
- Bug fix for (#74) - Handle endless loop redirects caused by Routing middleware.
- Breaking change:
FluxorException
is now anabstract
class. - Unhandled exceptions in Effects can now notify the UI.
- Breaking change:
EffectMethod
andReducerMethod
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
- Improved speed of app start-up when using
options.ScanAssemblies
- Assemblies are now signed
- Set project options to treat all warnings as errors
- 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)
- Used Newtonsoft entirely for JS interop to ReduxDevTools to prevent serialization errors (#7)
- Added new FluxorLayout for auto-subscribing to state (#8)
- Bug fix for (#134) - URLs not taking into account query parameters
- Update NuGet package icons.
- Rewritten to make the library UI agnostic
Fluxor
- Separated out
Blazor.Fluxor
intoFluxor.Blazor.Web
- Separated out
Fluxor.Blazor.Web.ReduxDevTools
- Added new documentation
- Added basic-concepts tutorials demonstrating how to use Fluxor in a console app.
- Change
@Store.Initialize
to<Blazor.Fluxor.StoreInitializer/>
component, to allow async calls (fixes #120)
2.0 Release notes
In your App.razor
files replace the call to @Store.Initialize
with <Blazor.Fluxor.StoreInitializer/>
- Handle TaskCanceledException when initialising the store and server has disconnected from the client.
- Updated to SDK 3.1.2
- Made dispatching actions thread safe (#117)
- Fixed bug #110 (Cannot use Redux Dev Tools on server side)
- Fixed bug #98 (Cannot initialize store)
- Upgraded to DotNet Core 3.1 preview 4
- Prevent JavaScript initialisation from being executed twice.
- Add
IState.Unsubscribe
- Change store initialization technique to make server-side Blazor apps work on iOS and OSX browsers.
NOTE: You must manually add a script reference to _content/Blazor.Fluxor/index.js
to the host page in server-side apps.
- Initialise store in App.razor instead of MainLayout.razor
- First major release
- Upgraded to DotNet Core 3
- Work around for Blazor bug that stops injected scripts working in Safari.
- Allow multiple reducers in a class (and static reducers) with
[ReducerMethod]
- Allow multiple effects in a class (and static effects) with
[EffectMethod]
- Removed
MultiActionReducer<TState>
due to newReducerMethodAttribute
Issues fixed
- Update to Blazor RC1
- Remove White=Positive / Black=Negative terms - Use Include/Exclude instead.
- Update to Blazor preview 9
- Added a new class
MultiActionReducer<TState>
that allows you to combine multiple reducers into a single class.
- Fixed a harmless null reference error when running server-side
- Fixed FlightFinder sample's UI and binding
- TypeExtensions.GetNamespace extension method removed in favor of Type.Namespace
- Fixed bug that caused an error when the project contained an abstract class that implements a Fluxor interface
- Added a StateChanged event to IFeature<T> and IState<T>
- Update to Blazor preview 8
- Update to Blazor preview 7
- Alter the icon that appears in NuGet
- Remove IAction. Actions may now be any type of object.
NOTE: Due to a bug in System.Text.Json the ReduxDevTools do not work in this release.
- Upgraded to latest packages (.net core v3.0.0-preview6.19307.2)
- Upgraded to latest packages (.net core v3.0.0-preview5-19227-01)
- Upgraded to latest packages (.net core v3.0.0-preview4-19216-03)
- Rename *.cshtml to *.razor
- Change project start up code to reflect most recent approach
- Upgraded to latest packages (.net core v3.0.0-preview3-19153-02)
- Upgraded to Blazor 0.9.0
- Upgraded to Blazor 0.8.0 (Thanks to @chris_sainty on Twitter)
- Changed UseDependencyInjection to use
AddScoped
instead ofAddSingleton
so server-side Blazor apps do not share the same store across clients.
- Upgraded to Blazor 0.7.0
- Upgraded to Blazor 0.6.0
- Added a Task to IStore named
Initialized
that can be awaited inOnInitializedAsync
- Added setTimeout workaround because Blazor won't allow calling StateHasChanged when the page loads
- Queue dispatched actions until store is initialized and then dequeue them.
- Made demos reference NuGet packages so they can be downloaded separately.
Issues fixed
- Upgraded to Blazor 0.5.1.
- Effects and Middlewares must now call
IDispatcher.Dispatch()
to dispatch actions.
- Added state change observer pattern. Calling
SomeInjectedState.Changed(this, StateHasChanged)
in a component'sOnInitialized
method will subscribe to all state changes triggered by other components. - Changed
IState.Current
toIState.Value
- Modified the official Blazor
Flight Finder
demo to use Fluxor. Status is incomplete but functional.
- Changed the way Effects and Reducers work so the developer has more flexibility in chosing what they react to (descendant classes, implemented interfaces, etc)
- Added unit tests
- Change versioning scheme to match the Blazor approach (increment minor version per release)
- Make BrowserInterop an injected service
- Ensure DisposableCallback can only be disposed once
- Change Store.Features from IEnumerable<IFeature> to IReadonlyDictionary<string, Feature> for fast lookup and prevention of duplicate keys
- Make Store.BeginInternalMiddlewareChange re-entrant
- Fix NullReferenceException that could occur when Middleware returned null from IMiddleware.AfterDispatch
- Allow middleware to return tasks to dispatch from IMiddleware.AfterDispatch
- Make methods of
Feature<TState>
virtual. - Upgraded to Blazor 0.4.0
- Introduced IDispatcher for dispatching actions from Blazor components so that the whole IStore isn't required.
- Introduced IState for providing feature state to Blazor components so that the entire IFeature<T> doesn't need to be referenced.
- Renamed
Handle
toHandleAsync
in effects - Added source docs
- Added an example showing how to create Middleware modules for Fluxor
- Fixed a bug where components were not displaying state updates when actions effecting their state were dispatched from another component
- Renamed IStoreMiddleware to IMiddleware
- Allow middleware to veto the dispatching of actions
- Allow middleware to declare Javascript it needs to be added into the site's html page
- Add routing middleware
- Exclude auto-discovery of features / reducers / effects in namespaces that contain a class that implements IMiddleware
- Auto register features / reducers / effects for classes in the same namespace (or below) of any class added with Options.AddMiddleware
- Changed the signature of IStore.Dispatch to IStore.DispatchAsync
- Upgraded to latest version of Blazor (0.3.0)
- Changed the signature of ServiceCollection.AddFluxor to pass in an Options object
- Added support for Redux Dev Tools
- Added support for adding custom Middleware
- Changed side-effects to return an array of actions to dispatch rather than limiting it to a single action
- Added side-effects for calling out to async routines such as HTTP requests
- Added a sample application to the [Sample projects][8]
- Automatic discovery of store, features, and reducers via dependency injection.
- Basic store / feature / reducer implementation