Closed Odonno closed 6 years ago
@mhusainisurge I started writing the docs but one thing got my attention on the History feature. What if you have undone actions and then dispatch the same set of actions without using Redo function?
Should we set clearFuture
value to true
only if the next action is different from the one in the previous timeline?
I think of this as being similar to what happens in a text editor. If you undo and then manually redo the same operation, the redo stack is not preserved. I can go either way on this, with a minor preference for the way it is.
That's fair. Thanks for the reply.
Hello again @mhusainisurge
I am currently writing the sample app that demonstrates how to use ReduxSimple library in a UWP application. I made some examples and one in particular is using side effects by calling a web API. This example uses the pattern with 3 actions (start asynchronous task, complete or error).
It works great but there is an issue with time travelling/history. If go back in history and then forward, the "start async task" is triggered again the API call is made which then breaks the timeline because a new action is dispatched outside of the History (when the task completed or error occured).
So, do you have an idea to fix this issue? I thought using a boolean to tell if the action is dispatched normally or if it comes from the History. But not sure if it is the best option.
I moved the thread here #29