(root, renderPriorityLevel)
| 22842 | } |
| 22843 | |
| 22844 | function commitMutationEffects(root, renderPriorityLevel) { |
| 22845 | // TODO: Should probably move the bulk of this function to commitWork. |
| 22846 | while (nextEffect !== null) { |
| 22847 | setCurrentFiber(nextEffect); |
| 22848 | var effectTag = nextEffect.effectTag; |
| 22849 | |
| 22850 | if (effectTag & ContentReset) { |
| 22851 | commitResetTextContent(nextEffect); |
| 22852 | } |
| 22853 | |
| 22854 | if (effectTag & Ref) { |
| 22855 | var current = nextEffect.alternate; |
| 22856 | |
| 22857 | if (current !== null) { |
| 22858 | commitDetachRef(current); |
| 22859 | } |
| 22860 | } // The following switch statement is only concerned about placement, |
| 22861 | // updates, and deletions. To avoid needing to add a case for every possible |
| 22862 | // bitmap value, we remove the secondary effects from the effect tag and |
| 22863 | // switch on that value. |
| 22864 | |
| 22865 | |
| 22866 | var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating); |
| 22867 | |
| 22868 | switch (primaryEffectTag) { |
| 22869 | case Placement: |
| 22870 | { |
| 22871 | commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is |
| 22872 | // inserted, before any life-cycles like componentDidMount gets called. |
| 22873 | // TODO: findDOMNode doesn't rely on this any more but isMounted does |
| 22874 | // and isMounted is deprecated anyway so we should be able to kill this. |
| 22875 | |
| 22876 | nextEffect.effectTag &= ~Placement; |
| 22877 | break; |
| 22878 | } |
| 22879 | |
| 22880 | case PlacementAndUpdate: |
| 22881 | { |
| 22882 | // Placement |
| 22883 | commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is |
| 22884 | // inserted, before any life-cycles like componentDidMount gets called. |
| 22885 | |
| 22886 | nextEffect.effectTag &= ~Placement; // Update |
| 22887 | |
| 22888 | var _current = nextEffect.alternate; |
| 22889 | commitWork(_current, nextEffect); |
| 22890 | break; |
| 22891 | } |
| 22892 | |
| 22893 | case Hydrating: |
| 22894 | { |
| 22895 | nextEffect.effectTag &= ~Hydrating; |
| 22896 | break; |
| 22897 | } |
| 22898 | |
| 22899 | case HydratingAndUpdate: |
| 22900 | { |
| 22901 | nextEffect.effectTag &= ~Hydrating; // Update |
nothing calls this directly
no test coverage detected