You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just tried to use all the described features and here are some ideas how to improve the readme.
1. Create Reducer functions
It is not so obvious without looking into your code that it is required to specify using static ReduxSimple.Reducers to use On.
It would be helpful to specify the full namespace ReduxSimple.Reducers.On in the examples.
public static class Reducers
{
public static IEnumerable<On<RootState>> CreateReducers()
{
return new List<On<RootState>>
{
ReduxSimple.Reducers.On<NavigateAction, RootState>(
2. Reducers on action
It seems the reducer is wrong as CurrentPage setter is not called.
Why don't you update it here?
You can define a list of On functions where at least one action can be triggered.
It is a potential error prone code imho.
a) the current UpsertOne impl requires the writable property Id in TodoItem class to be properly converted (would be nice to have just a field)
b) if you make a mistake in the anonymous class (name the property as ID instead of Id) you will receive the unfriendly message Value cannot be null. Parameter name: key' from the UpsertMany method.
It would be nice to raise some specific exceptions for such cases.
What you do think?
The text was updated successfully, but these errors were encountered:
Hey guys,
I've just tried to use all the described features and here are some ideas how to improve the readme.
1. Create Reducer functions
It is not so obvious without looking into your code that it is required to specify using static ReduxSimple.Reducers to use On.
It would be helpful to specify the full namespace ReduxSimple.Reducers.On in the examples.
2. Reducers on action
It seems the reducer is wrong as CurrentPage setter is not called.
Why don't you update it here?
I had to replace it with
3. Enable time travel
It's not so obvious how to track Redo action.
It would be helpful to specify it directly in the readme file or even to implement ObserveRedoneAction.
4.1 Entity management (in preview)
Could you publish the preview version as a separate alpha/beta package? something like ReduxSimple.Entity.dll
4.2 Then use the EntityAdapter in reducers
It is a potential error prone code imho.
a) the current UpsertOne impl requires the writable property Id in TodoItem class to be properly converted (would be nice to have just a field)
b) if you make a mistake in the anonymous class (name the property as ID instead of Id) you will receive the unfriendly message Value cannot be null. Parameter name: key' from the UpsertMany method.
It would be nice to raise some specific exceptions for such cases.
What you do think?
The text was updated successfully, but these errors were encountered: