Skip to content
This repository was archived by the owner on Apr 22, 2026. It is now read-only.
This repository was archived by the owner on Apr 22, 2026. It is now read-only.

Advice on how to write a plugin for inline or async data operations (e.g. promises) #60

@droplab

Description

@droplab

Hi, have been using this library for years - thanks for the efforts on this. I've been mulling over whether it's possible for a plugin to handle asynchronous/promise operations? A couple of use cases:

  • I'm pulling data asynchronously from a remote api, I want pxloader to wait for the data to come in. I just saw that there is a PxLoaderData plugin for this use case.
  • I'm running internal data handling logic that involves the use of a promise. I want pxloader to wait for the promise to resolve.

I took a quick look at some of the existing plugins but didn't have time to dig into them. I imagine others must have this same use case in their apps. So my question at this point is, what is the best approach here: write a custom plugin that ties all of this into pxloader or handle these types of async/promise operations outside of pxloader?

If it's the latter, the issue is then how to seamlessly integrate into pxloader's progress/complete logic and handlers?

Thanks in advance for any guidance/info on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions