Mojang/ore-ui

Non-blocking DeferredMountWithCallback

Closed this issue · 1 comments

As of #34, when DeferredMountWithCallback is used, all deferred rendering is paused until that callback is invoked.

To avoid blocking all rendering, we might want to place the callback in a second queue for notifying when all rendering is complete, but avoid blocking the start of render of the next component. This should be optional, so that we can also block when waiting for render to be completed before starting the next.

This change does not break API.

We should introduce a new property for signalling when we explicitly want to block further rendering, it could look something like this:

<DeferredMountWithCallback isBlocking>
  <ComponentThatShouldBeWaitedFor />
</DeferredMountWithCallback>

Deferred mount is being deprecated with #59