function accumulateTwoPhaseDispatchesSingle(event) {
  if (event && event.dispatchConfig.phasedRegistrationNames) {
    EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(
      event.dispatchMarker,
      accumulateDirectionalDispatches,
      event
    );
  }
}
Collect dispatches (must be entirely collected before dispatching - see unit
tests). Lazily allocate the array to conserve memory.  We must loop through
each event and perform the traversal for each one. We can not perform a
single traversal for the entire collection of events because each event may
have a different target.