react-async-states icon indicating copy to clipboard operation
react-async-states copied to clipboard

Support timeline: keeping track of "some" previous states

Open incepter opened this issue 3 years ago • 2 comments

The core of the library should be able to keep track of "some" configurable previous states and allow linking them

for example for a giving state, you can tell if it is the current or not, and grab any previous or any next and make it current.

This should push the mental model of the library to another level,

the expected changes although may be start at the State type by introducing the linked behavior

incepter avatar May 05 '22 22:05 incepter

This may be like this:

first you add the necessary configuration:

timeline: {
  enabled: boolean,
  keepState: (state: State) => boolean,
  statesToKeep: boolean, // count of states to keep in the timeline
}

incepter avatar May 10 '22 17:05 incepter

low priority

incepter avatar May 10 '22 17:05 incepter