redux-async-queue icon indicating copy to clipboard operation
redux-async-queue copied to clipboard

Manage loader for X components

Open florentsorel opened this issue 8 years ago • 0 comments

Hi,

It's possible to display a loader for the current action in component who is currently called?

For example:

render() {
  <div>
    {/* display a loader when the ajax/interval is in the queue */}
    <button onClick={this.props.addToQueue} />
  </div>
}

When addToQueue is called we show a loader component for the current component clicked. So, like that we can view in real time what is happening in the view.

  1. I click on the first item
  2. I see a loader in that component, the request is still in queue (20s)
  3. I click on other item, the first action is not finished yet, so we add the current one in the queue (20s)
  4. I see 2 loader in 2 component during the request is finished.

florentsorel avatar Apr 04 '17 23:04 florentsorel