Previously afterRender and afterNextRender allowed the user to pass
a phase to run the callback in as part of the AfterRenderOptions. This
worked, but made it cumbersome to coordinate work between phases.
This PR replaces the old phases API with a new one that allows passing a
callback per phase in a single afterRender / afterNextRender call.
The return value of each phase's callback is passed to the next phase
callback that was part of the same afterRender call.
Previously
afterRender
andafterNextRender
allowed the user to pass a phase to run the callback in as part of theAfterRenderOptions
. This worked, but made it cumbersome to coordinate work between phases.This PR replaces the old phases API with a new one that allows passing a callback per phase in a single
afterRender
/afterNextRender
call. The return value of each phase's callback is passed to the next phase callback that was part of the sameafterRender
call.This API also retains the ability to pass a single callback, which will be run in the
mixedReadWrite
phase.