Skip to content

Manage loader for X components #4

@florentsorel

Description

@florentsorel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions