Backed out 7 changesets (bug 1518487) for failures on devtools/client/accessibility/test/browser/browser_accessibility_sidebar_checks.js. CLOSED TREE
authorCsoregi Natalia <ncsoregi@mozilla.com>
Tue, 12 Feb 2019 00:33:42 +0200
changeset 458603 fa0dd711bbf7c3d5cbe685aff19fa1811380476d
parent 458602 4c37ccc879d7377ed75f5ddf1ddeaacd83259b2e
child 458604 07d21448117d2c60fdbd645bb3f75820abee8418
push id77928
push userncsoregi@mozilla.com
push dateMon, 11 Feb 2019 22:34:02 +0000
treeherderautoland@fa0dd711bbf7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1518487
milestone67.0a1
backs out7a4f96a4d71cfc6a03d79ad5e673a4722841e74d
8031278b4a170b154bd6f17e9e08e609935126a3
d55e9ed92676de059268b83c78191d15c448a963
fc1687cc488d120e4d2b30a17e6e0be33c2cebd8
0d2800976a32f13c02da1e8c6ee06359155e03f0
62f78c63d9f1a5ca9232b94202657e73d8fb7190
bc6cc126a9b4b4dd3b1369824abd7d387f8560c1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 7 changesets (bug 1518487) for failures on devtools/client/accessibility/test/browser/browser_accessibility_sidebar_checks.js. CLOSED TREE Backed out changeset 7a4f96a4d71c (bug 1518487) Backed out changeset 8031278b4a17 (bug 1518487) Backed out changeset d55e9ed92676 (bug 1518487) Backed out changeset fc1687cc488d (bug 1518487) Backed out changeset 0d2800976a32 (bug 1518487) Backed out changeset 62f78c63d9f1 (bug 1518487) Backed out changeset bc6cc126a9b4 (bug 1518487)
devtools/client/accessibility/accessibility-startup.js
devtools/client/accessibility/accessibility.css
devtools/client/accessibility/actions/details.js
devtools/client/accessibility/components/AccessibilityRow.js
devtools/client/accessibility/components/Accessible.js
devtools/client/accessibility/components/Checks.js
devtools/client/accessibility/components/ColorContrastAccessibility.js
devtools/client/accessibility/components/LearnMoreLink.js
devtools/client/accessibility/components/RightSidebar.js
devtools/client/accessibility/components/moz.build
devtools/client/accessibility/constants.js
devtools/client/accessibility/index.html
devtools/client/accessibility/reducers/details.js
devtools/client/accessibility/test/browser/browser.ini
devtools/client/accessibility/test/browser/browser_accessibility_mutations.js
devtools/client/accessibility/test/browser/browser_accessibility_relation_navigation.js
devtools/client/accessibility/test/browser/browser_accessibility_reload.js
devtools/client/accessibility/test/browser/browser_accessibility_sidebar.js
devtools/client/accessibility/test/browser/browser_accessibility_sidebar_checks.js
devtools/client/accessibility/test/browser/browser_accessibility_tree.js
devtools/client/accessibility/test/browser/browser_accessibility_tree_nagivation.js
devtools/client/accessibility/test/browser/head.js
devtools/client/accessibility/test/mochitest/chrome.ini
devtools/client/accessibility/test/mochitest/contrast.snapshots.js
devtools/client/accessibility/test/mochitest/test_accessible_contrast.html
devtools/client/accessibility/test/mochitest/test_accessible_learnMoreLink.html
devtools/client/locales/en-US/accessibility.properties
devtools/client/shared/components/Accordion.css
devtools/client/shared/components/Accordion.js
devtools/client/shared/components/List.css
devtools/client/shared/components/List.js
devtools/client/shared/components/VirtualizedTree.js
devtools/client/shared/components/moz.build
devtools/client/shared/components/test/mochitest/accordion.snapshots.js
devtools/client/shared/components/test/mochitest/chrome.ini
devtools/client/shared/components/test/mochitest/head.js
devtools/client/shared/components/test/mochitest/test_accordion.html
devtools/client/shared/components/test/mochitest/test_list.html
devtools/client/shared/components/test/mochitest/test_list_keyboard.html
devtools/client/shared/components/test/mochitest/test_tree_11.html
devtools/client/shared/components/test/mochitest/test_tree_13.html
devtools/client/shared/scroll.js
devtools/client/shared/vendor/REACT_UPGRADING.md
devtools/client/shared/vendor/moz.build
devtools/client/shared/vendor/react-test-renderer.js
devtools/server/actors/accessibility/accessible.js
devtools/server/actors/accessibility/walker.js
devtools/shared/specs/accessibility.js
--- a/devtools/client/accessibility/accessibility-startup.js
+++ b/devtools/client/accessibility/accessibility-startup.js
@@ -48,24 +48,19 @@ class AccessibilityStartup {
       this._walker = await this._accessibility.getWalker();
 
       this._supports = {};
       // Only works with FF61+ targets
       this._supports.enableDisable =
         await this.target.actorHasMethod("accessibility", "enable");
 
       if (this._supports.enableDisable) {
-        ([
-          this._supports.relations,
-          this._supports.snapshot,
-          this._supports.audit,
-        ] = await Promise.all([
+        ([ this._supports.relations, this._supports.snapshot ] = await Promise.all([
           this.target.actorHasMethod("accessible", "getRelations"),
           this.target.actorHasMethod("accessible", "snapshot"),
-          this.target.actorHasMethod("accessible", "audit"),
         ]));
 
         await this._accessibility.bootstrap();
       }
 
       return true;
     } catch (e) {
       // toolbox may be destroyed during this step.
--- a/devtools/client/accessibility/accessibility.css
+++ b/devtools/client/accessibility/accessibility.css
@@ -5,41 +5,40 @@
 :root {
   --accessibility-font-size: 12px;
   --accessibility-toolbar-height: 24px;
   --accessibility-toolbar-height-tall: 35px;
   --accessibility-toolbar-focus: var(--blue-50);
   --accessibility-toolbar-focus-alpha30: rgba(10, 132, 255, 0.3);
   --accessibility-full-length-minus-splitter: calc(100% - 1px);
   --accessibility-horizontal-padding: 5px;
-  --accessibility-horizontal-indent: 20px;
-  --accessibility-properties-item-width: calc(100% - var(--accessibility-horizontal-indent));
+  --accessibility-properties-item-width: calc(100% - var(--accessibility-horizontal-padding));
   --accessibility-arrow-horizontal-padding: 4px;
   --accessibility-tree-row-height: 21px;
   --accessibility-unfocused-tree-focused-node-background: var(--grey-20);
   --accessibility-unfocused-tree-focused-node-twisty-fill: var(--theme-icon-dimmed-color);
   --accessibility-link-color: var(--blue-60);
   --accessibility-link-color-active: var(--blue-70);
   --accessible-role-active-background-color: var(--blue-50);
   --accessible-role-active-border-color: #FFFFFFB3;
-  --accessible-label-background-color: white;
-  --accessible-label-border-color: #CACAD1;
-  --accessible-label-color: var(--grey-60);
+  --accessible-role-background-color: white;
+  --accessible-role-border-color: #CACAD1;
+  --accessible-role-color: var(--grey-60);
 }
 
 :root.theme-dark {
   --accessibility-unfocused-tree-focused-node-background: var(--grey-70);
   --accessibility-unfocused-tree-focused-node-twisty-fill: var(--theme-selection-color);
   --accessibility-link-color: var(--theme-highlight-blue);
   --accessibility-link-color-active: var(--blue-40);
   --accessible-role-active-background-color: var(--blue-60);
   --accessible-role-active-border-color: #FFF6;
-  --accessible-label-background-color: var(--grey-80);
-  --accessible-label-border-color: var(--grey-50);
-  --accessible-label-color: var(--grey-40);
+  --accessible-role-background-color: var(--grey-80);
+  --accessible-role-border-color: var(--grey-50);
+  --accessible-role-color: var(--grey-40);
 }
 
 /* General */
 html,
 body {
   height: 100%;
   margin: 0;
   padding: 0;
@@ -51,20 +50,16 @@ body {
 }
 
 @keyframes flash-out {
   from {
     background: var(--theme-contrast-background);
   }
 }
 
-.accessible .tree .node .theme-twisty {
-  width: var(--accessibility-horizontal-indent);
-}
-
 .accessible .tree .node.focused .theme-twisty,
 .treeTable .treeRow.selected .theme-twisty {
   fill: var(--theme-selection-color);
 }
 
 .mainFrame .main-panel {
   flex: 1 1 auto;
   overflow: auto;
@@ -344,17 +339,17 @@ body {
 .accessible .tree button {
   display: block;
 }
 
 /* NOTE: total height of the node (height + padding + border + margin) must
    be exactly the same as the value of TREE_ROW_HEIGHT constant in
    devtools/client/accessibility/constants.js */
 .accessible .tree .node {
-  padding: 0 var(--accessibility-horizontal-indent);
+  padding: 0 var(--accessibility-horizontal-padding);
   position: relative;
   display: flex;
   height: var(--accessibility-tree-row-height);
   width: var(--accessibility-properties-item-width);
   cursor: default;
   align-items: center;
 }
 
@@ -412,19 +407,19 @@ body {
   padding-inline-end: var(--accessibility-arrow-horizontal-padding);
 }
 
 .accessible .tree .object-label {
   color: var(--theme-highlight-blue);
 }
 
 .accessible .tree .objectBox-accessible .accessible-role {
-  background-color: var(--accessible-label-background-color);
-  color: var(--accessible-label-color);
-  border: 1px solid var(--accessible-label-border-color);
+  background-color: var(--accessible-role-background-color);
+  color: var(--accessible-role-color);
+  border: 1px solid var(--accessible-role-border-color);
   border-radius: 3px;
   padding: 0px 2px;
   margin-inline-start: 5px;
 }
 
 .accessible .tree:focus .node.focused .objectBox-accessible .accessible-role {
   background-color: var(--accessible-role-active-background-color);
   border-color: var(--accessible-role-active-border-color);
@@ -451,17 +446,16 @@ body {
   overflow: hidden;
   text-overflow: ellipsis;
 }
 
 .accessible .tree .objectBox-accessible .open-accessibility-inspector,
 .accessible .tree .objectBox-node .open-inspector{
   width: 17px;
   cursor: pointer;
-  flex-shrink: 0;
 }
 
 .accessible .tree .objectBox-object,
 .accessible .tree .objectBox-string,
 .accessible .tree .objectBox-text,
 .accessible .tree .objectBox-table,
 .accessible .tree .objectLink-textNode,
 .accessible .tree .objectLink-event,
@@ -477,138 +471,8 @@ body {
 /* Styling for accessible details panel when accessible is not available */
 .accessible .info {
   color: var(--theme-body-color);
   font-size: 110%;
   padding-inline-start: var(--accessibility-arrow-horizontal-padding);
   height: var(--accessibility-toolbar-height-tall);
   line-height: var(--accessibility-toolbar-height-tall);
 }
-
-.checks-empty {
-  font-style: italic;
-  padding: 0.5em 20px;
-  -moz-user-select: none;
-  font-size: 12px;
-  white-space: initial;
-}
-
-/* Color Contrast */
-.accessibility-color-contrast-check,
-.accessibility-color-contrast {
-  position: relative;
-  display: flex;
-  cursor: default;
-  height: inherit;
-}
-
-.accessibility-color-contrast-check {
-  flex-direction: column;
-  padding: 4px var(--accessibility-horizontal-indent);
-  line-height: 20px;
-}
-
-.accessibility-color-contrast {
-  align-items: baseline;
-}
-
-.accessibility-color-contrast-header {
-  margin: 0;
-  font-weight: bold;
-  font-size: var(--accessibility-font-size);
-  line-height: var(--accessibility-toolbar-height);
-}
-
-.accessibility-color-contrast-annotation {
-  margin: 0;
-  white-space: normal;
-  color: var(--accessible-label-color);
-}
-
-.accessibility-color-contrast-annotation .link {
-  color: var(--accessibility-link-color);
-  cursor: pointer;
-  outline: 0;
-  white-space: nowrap;
-  font-style: normal;
-}
-
-.accessibility-color-contrast-annotation .link:hover:not(:focus) {
-  text-decoration: underline;
-}
-
-.accessibility-color-contrast-annotation .link:focus:not(:active) {
-  box-shadow: 0 0 0 2px var(--accessibility-toolbar-focus), 0 0 0 4px var(--accessibility-toolbar-focus-alpha30);
-  border-radius: 2px;
-}
-
-.accessibility-color-contrast-annotation .link:active {
-  color: var(--accessibility-link-color-active);
-  text-decoration: underline;
-}
-
-.accessibility-color-contrast-large-text {
-  background-color: var(--accessible-label-background-color);
-  color: var(--accessible-label-color);
-  outline: 1px solid var(--accessible-label-border-color);
-  -moz-outline-radius: 3px;
-  padding: 0px 2px;
-  margin-inline-start: 6px;
-  line-height: initial;
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:not(:empty) {
-  margin-block-end: 4px;
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:not(:empty):before {
-  content: "";
-  height: 14px;
-  width: 14px;
-  display: inline-flex;
-  background-color: var(--accessibility-contrast-color);
-  box-shadow: 0 0 0 1px var(--grey-40), 6px 5px var(--accessibility-contrast-bg), 6px 5px 0 1px var(--grey-40);
-  margin-inline-end: 11px;
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:first-child:not(:empty):before {
-  margin-inline-start: 1px;
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:not(:first-child):not(:empty):before {
-  margin-inline-start: 4px;
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:not(:empty):after {
-  margin-inline-start: 4px;
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:not(:empty).AA:after,
-.accessibility-color-contrast .accessibility-contrast-value:not(:empty).AAA:after {
-  color: var(--theme-highlight-green);
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:not(:empty).fail:after {
-  color: #E57180;
-  content: "⚠️";
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:not(:empty).AA:after {
-  content: "AA\2713";
-}
-
-.accessibility-color-contrast .accessibility-contrast-value:not(:empty).AAA:after {
-  content: "AAA\2713";
-}
-
-.accessibility-color-contrast .accessibility-color-contrast-label:after {
-  content: ":";
-}
-
-.accessibility-color-contrast .accessibility-color-contrast-label,
-.accessibility-color-contrast .accessibility-color-contrast-separator:before {
-  margin-inline-end: 3px;
-}
-
-.accessibility-color-contrast .accessibility-color-contrast-separator:before {
-  content: "-";
-  margin-inline-start: 4px;
-}
--- a/devtools/client/accessibility/actions/details.js
+++ b/devtools/client/accessibility/actions/details.js
@@ -11,11 +11,10 @@ const { UPDATE_DETAILS } = require("../c
  * @param {Object} dom walker front
  * @param {Object} accessible front
  * @param {Object} list of supported serverside features.
  */
 exports.updateDetails = (domWalker, accessible, supports) =>
   dispatch => Promise.all([
     domWalker.getNodeFromActor(accessible.actorID, ["rawAccessible", "DOMNode"]),
     supports.relations ? accessible.getRelations() : [],
-    supports.audit ? accessible.audit() : {},
   ]).then(response => dispatch({ accessible, type: UPDATE_DETAILS, response }))
     .catch(error => dispatch({ accessible, type: UPDATE_DETAILS, error }));
--- a/devtools/client/accessibility/components/AccessibilityRow.js
+++ b/devtools/client/accessibility/components/AccessibilityRow.js
@@ -65,17 +65,16 @@ class AccessibilityRow extends Component
       dispatch: PropTypes.func.isRequired,
       walker: PropTypes.object,
     };
   }
 
   componentDidMount() {
     const { selected, object } = this.props.member;
     if (selected) {
-      this.unhighlight();
       this.updateAndScrollIntoViewIfNeeded();
       this.highlight(object, { duration: VALUE_HIGHLIGHT_DURATION });
     }
 
     if (this.props.highlighted) {
       this.scrollIntoView();
     }
   }
@@ -83,17 +82,16 @@ class AccessibilityRow extends Component
   /**
    * Update accessible object details that are going to be rendered inside the
    * accessible panel sidebar.
    */
   componentDidUpdate(prevProps) {
     const { selected, object } = this.props.member;
     // If row is selected, update corresponding accessible details.
     if (!prevProps.member.selected && selected) {
-      this.unhighlight();
       this.updateAndScrollIntoViewIfNeeded();
       this.highlight(object, { duration: VALUE_HIGHLIGHT_DURATION });
     }
 
     if (this.props.highlighted) {
       this.scrollIntoView();
     }
 
--- a/devtools/client/accessibility/components/Accessible.js
+++ b/devtools/client/accessibility/components/Accessible.js
@@ -26,17 +26,17 @@ const { REPS, MODE } = require("devtools
 const { Rep, ElementNode, Accessible: AccessibleRep, Obj } = REPS;
 
 const { translateNodeFrontToGrip } = require("devtools/client/inspector/shared/utils");
 
 loader.lazyRequireGetter(this, "openContentLink", "devtools/client/shared/link", true);
 
 const TELEMETRY_NODE_INSPECTED_COUNT = "devtools.accessibility.node_inspected_count";
 
-const TREE_DEPTH_PADDING_INCREMENT = 20;
+const TREE_DEPTH_PADDING_INCREMENT = 15;
 
 class AccessiblePropertyClass extends Component {
   static get propTypes() {
     return {
       accessible: PropTypes.string,
       object: PropTypes.any,
       focused: PropTypes.bool,
       children: PropTypes.func,
deleted file mode 100644
--- a/devtools/client/accessibility/components/Checks.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-"use strict";
-
-// React
-const { Component, createFactory } = require("devtools/client/shared/vendor/react");
-const { connect } = require("devtools/client/shared/vendor/react-redux");
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { div } = require("devtools/client/shared/vendor/react-dom-factories");
-
-const List = createFactory(require("devtools/client/shared/components/List").List);
-const ColorContrastCheck =
-  createFactory(require("./ColorContrastAccessibility").ColorContrastCheck);
-const { L10N } = require("../utils/l10n");
-
-function EmptyChecks() {
-  return (
-    div({
-      className: "checks-empty",
-      role: "presentation",
-    }, L10N.getStr("accessibility.checks.empty"))
-  );
-}
-
-// Component that is responsible for rendering accessible audit data in the a11y panel
-// sidebar.
-class Checks extends Component {
-  static get propTypes() {
-    return {
-      audit: PropTypes.object,
-      labelledby: PropTypes.string.isRequired,
-    };
-  }
-
-  contrastRatio(contrastRatio) {
-    return ColorContrastCheck(contrastRatio);
-  }
-
-  render() {
-    const { audit, labelledby } = this.props;
-    if (!audit) {
-      return EmptyChecks();
-    }
-
-    const items = [];
-    for (const name in audit) {
-      // There are going to be various audit reports for this object, sent by the server.
-      // Iterate over them and delegate rendering to the method with the corresponding
-      // name.
-      if (audit[name] && this[name]) {
-        items.push({
-          component: this[name](audit[name]),
-          className: name,
-          key: name,
-        });
-      }
-    }
-
-    if (items.length === 0) {
-      return EmptyChecks();
-    }
-
-    return (
-      div({
-        className: "checks",
-        role: "presentation",
-      }, List({ items, labelledby }))
-    );
-  }
-}
-
-const mapStateToProps = ({ details, ui }) => {
-  if (!ui.supports.audit) {
-    return {};
-  }
-
-  const { audit } = details;
-  if (!audit) {
-    return {};
-  }
-
-  return { audit };
-};
-
-module.exports = connect(mapStateToProps)(Checks);
deleted file mode 100644
--- a/devtools/client/accessibility/components/ColorContrastAccessibility.js
+++ /dev/null
@@ -1,219 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const { Component, createFactory } = require("devtools/client/shared/vendor/react");
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { div, span, h3 } = require("devtools/client/shared/vendor/react-dom-factories");
-const LearnMoreLink = createFactory(require("./LearnMoreLink"));
-
-const { A11Y_CONTRAST_LEARN_MORE_LINK } = require("../constants");
-const { L10N } = require("../utils/l10n");
-
-/**
- * Component that renders a colour contrast value along with a swatch preview of what the
- * text and background colours are.
- */
-class ContrastValueClass extends Component {
-  static get propTypes() {
-    return {
-      backgroundColor: PropTypes.array.isRequired,
-      color: PropTypes.array.isRequired,
-      isLargeText: PropTypes.bool.isRequired,
-      value: PropTypes.number.isRequired,
-    };
-  }
-
-  render() {
-    const {
-      backgroundColor,
-      color,
-      isLargeText,
-      value,
-    } = this.props;
-
-    const className = [
-      "accessibility-contrast-value",
-      getContrastRatioScore(value, isLargeText),
-    ].join(" ");
-
-    return (
-      span({
-        className,
-        role: "presentation",
-        style: {
-          "--accessibility-contrast-color": `rgba(${color})`,
-          "--accessibility-contrast-bg": `rgba(${backgroundColor})`,
-        },
-      }, value.toFixed(2))
-    );
-  }
-}
-
-const ContrastValue = createFactory(ContrastValueClass);
-
-/**
- * Component that renders labeled colour contrast values together with the large text
- * indiscator.
- */
-class ColorContrastAccessibilityClass extends Component {
-  static get propTypes() {
-    return {
-      error: PropTypes.string,
-      isLargeText: PropTypes.bool.isRequired,
-      color: PropTypes.array.isRequired,
-      value: PropTypes.number,
-      min: PropTypes.number,
-      max: PropTypes.number,
-      backgroundColor: PropTypes.array,
-      backgroundColorMin: PropTypes.array,
-      backgroundColorMax: PropTypes.array,
-    };
-  }
-
-  render() {
-    const {
-      error,
-      isLargeText,
-      color,
-      value, backgroundColor,
-      min, backgroundColorMin,
-      max, backgroundColorMax,
-    } = this.props;
-
-    const children = [];
-
-    if (error) {
-      children.push(span({
-        className: "accessibility-color-contrast-error",
-        role: "presentation",
-      }, L10N.getStr("accessibility.contrast.error")));
-
-      return (div({
-        role: "presentation",
-        className: "accessibility-color-contrast",
-      }, ...children));
-    }
-
-    if (value) {
-      children.push(ContrastValue({ isLargeText, color, backgroundColor, value }));
-    } else {
-      children.push(
-        ContrastValue(
-          { isLargeText, color, backgroundColor: backgroundColorMin, value: min }),
-        div({
-          role: "presentation",
-          className: "accessibility-color-contrast-separator",
-        }),
-        ContrastValue(
-          { isLargeText, color, backgroundColor: backgroundColorMax, value: max }),
-      );
-    }
-
-    if (isLargeText) {
-      children.push(
-        span({
-          className: "accessibility-color-contrast-large-text",
-          role: "presentation",
-          title: L10N.getStr("accessibility.contrast.large.title"),
-        }, L10N.getStr("accessibility.contrast.large.text"))
-      );
-    }
-
-    return (
-      div(
-        {
-          role: "presentation",
-          className: "accessibility-color-contrast",
-        },
-        ...children
-      )
-    );
-  }
-}
-
-const ColorContrastAccessibility = createFactory(ColorContrastAccessibilityClass);
-
-class ContrastAnnotationClass extends Component {
-  static get propTypes() {
-    return {
-      isLargeText: PropTypes.bool.isRequired,
-      value: PropTypes.number,
-      min: PropTypes.number,
-    };
-  }
-
-  render() {
-    const { isLargeText, min, value } = this.props;
-    const score = getContrastRatioScore(value || min, isLargeText);
-
-    return (
-      LearnMoreLink(
-        {
-          className: "accessibility-color-contrast-annotation",
-          href: A11Y_CONTRAST_LEARN_MORE_LINK,
-          learnMoreStringKey: "accessibility.learnMore",
-          l10n: L10N,
-          messageStringKey: `accessibility.contrast.annotation.${score}`,
-        }
-      )
-    );
-  }
-}
-
-const ContrastAnnotation = createFactory(ContrastAnnotationClass);
-
-class ColorContrastCheck extends Component {
-  static get propTypes() {
-    return {
-      error: PropTypes.string.isRequired,
-    };
-  }
-
-  render() {
-    const { error } = this.props;
-
-    return (
-      div({
-        role: "presentation",
-        className: "accessibility-color-contrast-check",
-      },
-        h3({
-          className: "accessibility-color-contrast-header",
-        }, L10N.getStr("accessibility.contrast.header")),
-        ColorContrastAccessibility(this.props),
-        !error && ContrastAnnotation(this.props)
-      )
-    );
-  }
-}
-
-/**
- * Get contrast ratio score.
- * ratio.
- * @param  {Number} value
- *         Value of the contrast ratio for a given accessible object.
- * @param  {Boolean} isLargeText
- *         True if the accessible object contains large text.
- * @return {String}
- *         Represents the appropriate contrast ratio score.
- */
-function getContrastRatioScore(value, isLargeText) {
-  const levels = isLargeText ? { AA: 3, AAA: 4.5 } : { AA: 4.5, AAA: 7 };
-
-  let score = "fail";
-  if (value >= levels.AAA) {
-    score = "AAA";
-  } else if (value >= levels.AA) {
-    score = "AA";
-  }
-
-  return score;
-}
-
-module.exports = {
-  ColorContrastAccessibility: ColorContrastAccessibilityClass,
-  ColorContrastCheck,
-};
--- a/devtools/client/accessibility/components/LearnMoreLink.js
+++ b/devtools/client/accessibility/components/LearnMoreLink.js
@@ -12,17 +12,16 @@ const { openDocLink } = require("devtool
 
 /**
  * Localization friendly component for rendering a block of text with a "Learn more" link
  * as a part of it.
  */
 class LearnMoreLink extends Component {
   static get propTypes() {
     return {
-      className: PropTypes.string,
       href: PropTypes.string,
       learnMoreStringKey: PropTypes.string.isRequired,
       l10n: PropTypes.object.isRequired,
       messageStringKey: PropTypes.string.isRequired,
       onClick: PropTypes.func,
     };
   }
 
@@ -37,28 +36,25 @@ class LearnMoreLink extends Component {
   }
 
   static openDocOnClick(event) {
     event.preventDefault();
     openDocLink(event.target.href);
   }
 
   render() {
-    const { className, href, learnMoreStringKey, l10n, messageStringKey, onClick } =
-      this.props;
+    const { href, learnMoreStringKey, l10n, messageStringKey, onClick } = this.props;
     const learnMoreString = l10n.getStr(learnMoreStringKey);
     const messageString = l10n.getFormatStr(messageStringKey, learnMoreString);
 
     // Split the paragraph string with the link as a separator, and include the link into
     // results.
     const re = new RegExp(`(\\b${learnMoreString}\\b)`);
     const contents = messageString.split(re);
     contents[1] = a({ className: "link", href, onClick }, contents[1]);
 
     return (
-      p({
-        className,
-      }, ...contents)
+      p({}, ...contents)
     );
   }
 }
 
 module.exports = LearnMoreLink;
--- a/devtools/client/accessibility/components/RightSidebar.js
+++ b/devtools/client/accessibility/components/RightSidebar.js
@@ -5,53 +5,44 @@
 
 // React
 const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const { div } = require("devtools/client/shared/vendor/react-dom-factories");
 
 const { L10N } = require("../utils/l10n");
 const Accessible = createFactory(require("./Accessible"));
-const Accordion = createFactory(require("devtools/client/shared/components/Accordion"));
-const Checks = createFactory(require("./Checks"));
 
 // Component that is responsible for rendering accessible panel's sidebar.
 class RightSidebar extends Component {
   static get propTypes() {
     return {
       walker: PropTypes.object.isRequired,
     };
   }
 
   /**
    * Render the sidebar component.
    * @returns Sidebar React component.
    */
   render() {
-    const propertiesHeaderID = "accessibility-properties-header";
-    const checksHeaderID = "accessibility-checks-header";
+    const headerID = "accessibility-right-sidebar-header";
     const { walker } = this.props;
     return (
       div({
         className: "right-sidebar",
         role: "presentation",
       },
-        Accordion({
-          items: [{
-            className: "checks",
-            component: Checks({ labelledby: checksHeaderID }),
-            header: L10N.getStr("accessibility.checks"),
-            labelledby: checksHeaderID,
-            opened: true,
-          }, {
-            className: "accessible",
-            component: Accessible({ walker, labelledby: propertiesHeaderID }),
-            header: L10N.getStr("accessibility.properties"),
-            labelledby: propertiesHeaderID,
-            opened: true,
-          }],
-        })
+        div({
+          className: "_header",
+          id: headerID,
+          role: "heading",
+        }, L10N.getStr("accessibility.properties")),
+        div({
+          className: "_content accessible",
+          role: "presentation",
+        }, Accessible({ walker, labelledby: headerID }))
       )
     );
   }
 }
 
 module.exports = RightSidebar;
--- a/devtools/client/accessibility/components/moz.build
+++ b/devtools/client/accessibility/components/moz.build
@@ -2,16 +2,14 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DevToolsModules(
     'AccessibilityRow.js',
     'AccessibilityTree.js',
     'Accessible.js',
     'Button.js',
-    'Checks.js',
-    'ColorContrastAccessibility.js',
     'Description.js',
     'LearnMoreLink.js',
     'MainFrame.js',
     'RightSidebar.js',
     'Toolbar.js'
 )
--- a/devtools/client/accessibility/constants.js
+++ b/devtools/client/accessibility/constants.js
@@ -63,11 +63,8 @@ exports.ACCESSIBLE_EVENTS = [
 
 // Telemetry name constants.
 exports.A11Y_SERVICE_DURATION = "DEVTOOLS_ACCESSIBILITY_SERVICE_TIME_ACTIVE_SECONDS";
 exports.A11Y_SERVICE_ENABLED_COUNT = "devtools.accessibility.service_enabled_count";
 
 // URL constants
 exports.A11Y_LEARN_MORE_LINK =
   "https://developer.mozilla.org/docs/Tools/Accessibility_inspector";
-exports.A11Y_CONTRAST_LEARN_MORE_LINK =
-  "https://developer.mozilla.org/docs/Web/Accessibility/Understanding_WCAG/Perceivable/" +
-  "Color_contrast?utm_source=devtools&utm_medium=a11y-panel-checks-color-contrast";
--- a/devtools/client/accessibility/index.html
+++ b/devtools/client/accessibility/index.html
@@ -4,18 +4,16 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <!DOCTYPE html>
 <html dir="">
 <head>
   <meta charset="utf-8"/>
 
   <link href="resource://devtools/client/accessibility/accessibility.css" rel="stylesheet"/>
   <link href="resource://devtools/client/shared/components/splitter/SplitBox.css" rel="stylesheet" />
-  <link href="resource://devtools/client/shared/components/Accordion.css" rel="stylesheet" />
-  <link href="resource://devtools/client/shared/components/List.css" rel="stylesheet" />
   <link href="resource://devtools/client/shared/components/tree/TreeView.css" rel="stylesheet" />
 
   <script type="application/javascript"
           src="chrome://devtools/content/shared/theme-switching.js"></script>
 </head>
 <body class="theme-body devtools-monospace" role="application">
   <div id="content" role="presentation"></div>
   <script type="text/javascript" src="./main.js"></script>
--- a/devtools/client/accessibility/reducers/details.js
+++ b/devtools/client/accessibility/reducers/details.js
@@ -34,17 +34,17 @@ function details(state = getInitialState
  */
 function onUpdateDetails(state, action) {
   const { accessible, response, error } = action;
   if (error) {
     console.warn("Error fetching DOMNode for accessible", accessible, error);
     return state;
   }
 
-  const [ DOMNode, relationObjects, audit ] = response;
+  const [ DOMNode, relationObjects ] = response;
   const relations = {};
   relationObjects.forEach(({ type, targets }) => {
     relations[type] = targets.length === 1 ? targets[0] : targets;
   });
-  return { accessible, DOMNode, relations, audit };
+  return { accessible, DOMNode, relations };
 }
 
 exports.details = details;
--- a/devtools/client/accessibility/test/browser/browser.ini
+++ b/devtools/client/accessibility/test/browser/browser.ini
@@ -13,11 +13,10 @@ support-files =
 [browser_accessibility_context_menu_browser.js]
 [browser_accessibility_context_menu_inspector.js]
 [browser_accessibility_mutations.js]
 [browser_accessibility_panel_highlighter.js]
 [browser_accessibility_panel_highlighter_multi_tab.js]
 [browser_accessibility_relation_navigation.js]
 [browser_accessibility_reload.js]
 [browser_accessibility_sidebar.js]
-[browser_accessibility_sidebar_checks.js]
 [browser_accessibility_tree.js]
 [browser_accessibility_tree_nagivation.js]
--- a/devtools/client/accessibility/test/browser/browser_accessibility_mutations.js
+++ b/devtools/client/accessibility/test/browser/browser_accessibility_mutations.js
@@ -13,24 +13,24 @@ const TEST_URI = `<html>
     <p id="p">This is a paragraph.</p>
   </body>
 </html>`;
 
 /**
  * Test data has the format of:
  * {
  *   desc     {String}    description for better logging
- *   setup   {Function}  An optional setup that needs to be performed before
+ *   action   {Function}  An optional action that needs to be performed before
  *                        the state of the tree and the sidebar can be checked.
  *   expected {JSON}      An expected states for the tree and the sidebar.
  * }
  */
 const tests = [{
   desc: "Expand first and second rows, select third row.",
-  setup: async ({ doc }) => {
+  action: async ({ doc }) => {
     await toggleRow(doc, 0);
     await toggleRow(doc, 1);
     selectRow(doc, 3);
   },
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
@@ -53,17 +53,17 @@ const tests = [{
       keyboardShortcut: "",
       childCount: 1,
       indexInParent: 1,
       states: ["selectable text", "opaque", "enabled", "sensitive"],
     },
   },
 }, {
   desc: "Remove a child from a document.",
-  setup: async ({ doc, browser }) => {
+  action: async ({ doc, browser }) => {
     is(doc.querySelectorAll(".treeRow").length, 4, "Tree size is correct.");
     await ContentTask.spawn(browser, {}, () =>
       content.document.getElementById("p").remove());
     await BrowserTestUtils.waitForCondition(() =>
       doc.querySelectorAll(".treeRow").length === 3, "Tree updated.");
   },
   expected: {
     tree: [{
@@ -78,17 +78,17 @@ const tests = [{
     }],
     sidebar: {
       name: "Top level header",
       role: "text leaf",
     },
   },
 }, {
   desc: "Update child's text content.",
-  setup: async ({ browser }) => {
+  action: async ({ browser }) => {
     await ContentTask.spawn(browser, {}, () => {
       content.document.getElementById("h1").textContent = "New Header";
     });
   },
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
@@ -97,17 +97,17 @@ const tests = [{
       name: `"New Header"`,
     }, {
       role: "text leaf",
       name: `"New Header"`,
     }],
   },
 }, {
   desc: "Select third row in the tree.",
-  setup: ({ doc }) => selectRow(doc, 1),
+  action: ({ doc }) => selectRow(doc, 1),
   expected: {
     sidebar: {
       name: "New Header",
     },
   },
 }];
 
 /**
--- a/devtools/client/accessibility/test/browser/browser_accessibility_relation_navigation.js
+++ b/devtools/client/accessibility/test/browser/browser_accessibility_relation_navigation.js
@@ -13,17 +13,17 @@ const TEST_URI = `<html>
     <p>This is a paragraph.</p>
   </body>
 </html>`;
 
 /**
  * Test data has the format of:
  * {
  *   desc     {String}    description for better logging
- *   setup   {Function}  An optional setup that needs to be performed before
+ *   action   {Function}  An optional action that needs to be performed before
  *                        the state of the tree and the sidebar can be checked.
  *   expected {JSON}      An expected states for the tree and the sidebar.
  * }
  */
 const tests = [{
   desc: "Test the initial accessibility tree and sidebar states.",
   expected: {
     tree: [{
@@ -39,32 +39,32 @@ const tests = [{
       keyboardShortcut: "",
       childCount: 2,
       indexInParent: 0,
       states: ["readonly", "focusable", "opaque", "enabled", "sensitive"],
     },
   },
 }, {
   desc: "Expand first tree node.",
-  setup: async ({ doc }) => toggleRow(doc, 0),
+  action: async ({ doc }) => toggleRow(doc, 0),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }, {
       role: "heading",
       name: `"Top level header"`,
     }, {
       role: "paragraph",
       name: `""`,
     } ],
   },
 }, {
   desc: "Select second tree node.",
-  setup: async ({ doc }) => selectRow(doc, 1),
+  action: async ({ doc }) => selectRow(doc, 1),
   expected: {
     sidebar: {
       name: "Top level header",
       role: "heading",
       actions: [],
       value: "",
       description: "",
       keyboardShortcut: "",
@@ -76,17 +76,17 @@ const tests = [{
           name: "Accessibility Panel Test",
         },
       },
       states: ["selectable text", "opaque", "enabled", "sensitive"],
     },
   },
 }, {
   desc: "Select containing document.",
-  setup: async ({ doc, win }) => {
+  action: async ({ doc, win }) => {
     const relations = await selectProperty(doc, "/relations");
     EventUtils.sendMouseEvent({ type: "click" }, relations.querySelector(".arrow"), win);
     const containingDocRelation =
       await selectProperty(doc, "/relations/containing document");
     EventUtils.sendMouseEvent({ type: "click" },
       containingDocRelation.querySelector(".open-accessibility-inspector"), win);
   },
   expected: {
--- a/devtools/client/accessibility/test/browser/browser_accessibility_reload.js
+++ b/devtools/client/accessibility/test/browser/browser_accessibility_reload.js
@@ -21,24 +21,24 @@ const TEST_URI_2 = `<html>
   </head>
   <body></body>
 </html>`;
 
 /**
  * Test data has the format of:
  * {
  *   desc     {String}    description for better logging
- *   setup   {Function}  An optional setup that needs to be performed before
+ *   action   {Function}  An optional action that needs to be performed before
  *                        the state of the tree and the sidebar can be checked.
  *   expected {JSON}      An expected states for the tree and the sidebar.
  * }
  */
 const tests = [{
   desc: "Test the initial accessibility tree state after first row is expanded.",
-  setup: async ({ doc }) => toggleRow(doc, 0),
+  action: async ({ doc }) => toggleRow(doc, 0),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }, {
       role: "heading",
       name: `"Top level header"`,
     }, {
@@ -47,30 +47,30 @@ const tests = [{
     }],
     sidebar: {
       name: "Accessibility Panel Test",
       role: "document",
     },
   },
 }, {
   desc: "Reload the page.",
-  setup: async ({ panel }) => reload(panel.target),
+  action: async ({ panel }) => reload(panel.target),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }],
     sidebar: {
       name: "Accessibility Panel Test",
       role: "document",
     },
   },
 }, {
   desc: "Navigate to a new page.",
-  setup: async ({ panel }) => navigate(panel.target, buildURL(TEST_URI_2)),
+  action: async ({ panel }) => navigate(panel.target, buildURL(TEST_URI_2)),
   expected: {
     tree: [{
       role: "document",
       name: `"Navigation Accessibility Panel"`,
     }],
     sidebar: {
       name: "Navigation Accessibility Panel",
       role: "document",
--- a/devtools/client/accessibility/test/browser/browser_accessibility_sidebar.js
+++ b/devtools/client/accessibility/test/browser/browser_accessibility_sidebar.js
@@ -10,17 +10,17 @@ const TEST_URI = `<html>
   </head>
   <body></body>
 </html>`;
 
 /**
  * Test data has the format of:
  * {
  *   desc     {String}    description for better logging
- *   setup   {Function}  An optional setup that needs to be performed before
+ *   action   {Function}  An optional action that needs to be performed before
  *                        the state of the tree and the sidebar can be checked.
  *   expected {JSON}      An expected states for the tree and the sidebar.
  * }
  */
 const tests = [{
   desc: "Test the initial accessibility sidebar state.",
   expected: {
     sidebar: {
@@ -32,26 +32,26 @@ const tests = [{
       keyboardShortcut: "",
       childCount: 0,
       indexInParent: 0,
       states: ["readonly", "focusable", "opaque", "enabled", "sensitive"],
     },
   },
 }, {
   desc: "Mark document as disabled for accessibility.",
-  setup: async ({ browser }) => ContentTask.spawn(browser, {}, () =>
+  action: async ({ browser }) => ContentTask.spawn(browser, {}, () =>
     content.document.body.setAttribute("aria-disabled", true)),
   expected: {
     sidebar: {
       states: ["unavailable", "readonly", "focusable", "opaque"],
     },
   },
 }, {
   desc: "Append a new child to the document.",
-  setup: async ({ browser }) => ContentTask.spawn(browser, {}, () => {
+  action: async ({ browser }) => ContentTask.spawn(browser, {}, () => {
     const doc = content.document;
     const button = doc.createElement("button");
     button.textContent = "Press Me!";
     doc.body.appendChild(button);
   }),
   expected: {
     sidebar: {
       childCount: 1,
deleted file mode 100644
--- a/devtools/client/accessibility/test/browser/browser_accessibility_sidebar_checks.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const TEST_URI = `<html>
-  <head>
-    <meta charset="utf-8"/>
-    <title>Accessibility Panel Test</title>
-  </head>
-  <body>
-    <p style="color: red;">Red</p>
-    <p style="color: blue;">Blue</p>
-    <p style="color: gray; background: linear-gradient(#e66465, #9198e5);">Gray</p>
-  </body>
-</html>`;
-
-/**
- * Test data has the format of:
- * {
- *   desc     {String}    description for better logging
- *   setup    {Function}  An optional setup that needs to be performed before
- *                        the state of the tree and the sidebar can be checked.
- *   expected {JSON}      An expected states for the tree and the sidebar.
- * }
- */
-const tests = [{
-  desc: "Test the initial accessibility audit state.",
-  expected: {
-    audit: { contrastRatio: null },
-  },
-}, {
-  desc: "Check accessible representing text node in red.",
-  setup: async ({ doc }) => {
-    await toggleRow(doc, 0);
-    await toggleRow(doc, 1);
-    await selectRow(doc, 2);
-  },
-  expected: {
-    audit: {
-      "contrastRatio": {
-        "value": 4.00,
-        "color": [255, 0, 0, 1],
-        "backgroundColor": [255, 255, 255, 1],
-        "isLargeText": false,
-      },
-    },
-  },
-}, {
-  desc: "Check accessible representing text node in blue.",
-  setup: async ({ doc }) => {
-    await toggleRow(doc, 3);
-    await selectRow(doc, 4);
-  },
-  expected: {
-    audit: {
-      "contrastRatio": {
-        "value": 8.59,
-        "color": [0, 0, 255, 1],
-        "backgroundColor": [255, 255, 255, 1],
-        "isLargeText": false,
-      },
-    },
-  },
-}, {
-  desc: "Check accessible representing text node in gray over gradient background.",
-  setup: async ({ doc }) => {
-    await toggleRow(doc, 5);
-    await selectRow(doc, 6);
-  },
-  expected: {
-    audit: {
-      "contrastRatio": {
-        "min": 1.19,
-        "max": 1.39,
-        "color": [128, 128, 128, 1],
-        "backgroundColorMin": [219, 106, 116, 1],
-        "backgroundColorMax": [156, 145, 211, 1],
-        "isLargeText": false,
-      },
-    },
-  },
-}];
-
-/**
- * Test that checks the Accessibility panel sidebar.
- */
-addA11yPanelTestsTask(tests, TEST_URI, "Test Accessibility panel sidebar.");
--- a/devtools/client/accessibility/test/browser/browser_accessibility_tree.js
+++ b/devtools/client/accessibility/test/browser/browser_accessibility_tree.js
@@ -13,47 +13,47 @@ const TEST_URI = `<html>
     <p>This is a paragraph.</p>
   </body>
 </html>`;
 
 /**
  * Test data has the format of:
  * {
  *   desc     {String}    description for better logging
- *   setup    {Function}  An optional setup that needs to be performed before
+ *   action   {Function}  An optional action that needs to be performed before
  *                        the state of the tree and the sidebar can be checked.
  *   expected {JSON}      An expected states for the tree and the sidebar.
  * }
  */
 const tests = [{
   desc: "Test the initial accessibility tree state.",
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }],
   },
 }, {
   desc: "Expand first tree node.",
-  setup: async ({ doc }) => toggleRow(doc, 0),
+  action: async ({ doc }) => toggleRow(doc, 0),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }, {
       role: "heading",
       name: `"Top level header"`,
     }, {
       role: "paragraph",
       name: `""`,
     }],
   },
 }, {
   desc: "Collapse first tree node.",
-  setup: async ({ doc }) => toggleRow(doc, 0),
+  action: async ({ doc }) => toggleRow(doc, 0),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }],
   },
 }];
 
--- a/devtools/client/accessibility/test/browser/browser_accessibility_tree_nagivation.js
+++ b/devtools/client/accessibility/test/browser/browser_accessibility_tree_nagivation.js
@@ -13,17 +13,17 @@ const TEST_URI = `<html>
     <p>This is a paragraph.</p>
   </body>
 </html>`;
 
 /**
  * Test data has the format of:
  * {
  *   desc     {String}    description for better logging
- *   setup    {Function}  An optional setup that needs to be performed before
+ *   action   {Function}  An optional action that needs to be performed before
  *                        the state of the tree and the sidebar can be checked.
  *   expected {JSON}      An expected states for the tree and the sidebar.
  * }
  */
 const tests = [{
   desc: "Test the initial accessibility tree and sidebar states.",
   expected: {
     tree: [{
@@ -39,32 +39,32 @@ const tests = [{
       keyboardShortcut: "",
       childCount: 2,
       indexInParent: 0,
       states: ["readonly", "focusable", "opaque", "enabled", "sensitive"],
     },
   },
 }, {
   desc: "Expand first tree node.",
-  setup: async ({ doc }) => toggleRow(doc, 0),
+  action: async ({ doc }) => toggleRow(doc, 0),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }, {
       role: "heading",
       name: `"Top level header"`,
     }, {
       role: "paragraph",
       name: `""`,
     } ],
   },
 }, {
   desc: "Expand second tree node.",
-  setup: async ({ doc }) => toggleRow(doc, 1),
+  action: async ({ doc }) => toggleRow(doc, 1),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }, {
       role: "heading",
       name: `"Top level header"`,
     }, {
@@ -83,33 +83,33 @@ const tests = [{
       keyboardShortcut: "",
       childCount: 1,
       indexInParent: 0,
       states: ["selectable text", "opaque", "enabled", "sensitive"],
     },
   },
 }, {
   desc: "Select third tree node.",
-  setup: ({ doc }) => selectRow(doc, 2),
+  action: ({ doc }) => selectRow(doc, 2),
   expected: {
     sidebar: {
       name: "Top level header",
       role: "text leaf",
       actions: [],
       value: "",
       description: "",
       keyboardShortcut: "",
       childCount: 0,
       indexInParent: 0,
       states: ["opaque", "enabled", "sensitive"],
     },
   },
 }, {
   desc: "Collapse first tree node.",
-  setup: async ({ doc }) => toggleRow(doc, 0),
+  action: async ({ doc }) => toggleRow(doc, 0),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }],
     sidebar: {
       name: "Accessibility Panel Test",
       role: "document",
@@ -119,17 +119,17 @@ const tests = [{
       keyboardShortcut: "",
       childCount: 2,
       indexInParent: 0,
       states: ["readonly", "focusable", "opaque", "enabled", "sensitive"],
     },
   },
 }, {
   desc: "Expand first tree node again.",
-  setup: async ({ doc }) => toggleRow(doc, 0),
+  action: async ({ doc }) => toggleRow(doc, 0),
   expected: {
     tree: [{
       role: "document",
       name: `"Accessibility Panel Test"`,
     }, {
       role: "heading",
       name: `"Top level header"`,
     }, {
--- a/devtools/client/accessibility/test/browser/head.js
+++ b/devtools/client/accessibility/test/browser/head.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /* import-globals-from ../../../shared/test/shared-head.js */
 /* import-globals-from ../../../inspector/test/shared-head.js */
 
 /* global waitUntilState, gBrowser */
-/* exported addTestTab, checkTreeState, checkSidebarState, checkAuditState, selectRow,
+/* exported addTestTab, checkTreeState, checkSidebarState, selectRow,
             toggleRow, addA11yPanelTestsTask, reload, navigate */
 
 "use strict";
 
 // Import framework's shared head.
 Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/shared/test/shared-head.js",
   this);
@@ -200,62 +200,16 @@ function relationsMatch(relations, expec
       }
     }
   }
 
   return true;
 }
 
 /**
- * When comparing numerical values (for example contrast), we only care about the 2
- * decimal points.
- * @param  {String} _
- *         Key of the property that is parsed.
- * @param  {Any} value
- *         Value of the property that is parsed.
- * @return {Any}
- *         Newly formatted value in case of the numeric value.
- */
-function parseNumReplacer(_, value) {
-  if (typeof value === "number") {
-    return value.toFixed(2);
-  }
-
-  return value;
-}
-
-/**
- * Check the state of the accessibility sidebar audit(checks).
- * @param  {Object} store         React store for the panel (includes store for
- *                                the audit).
- * @param  {Object} expectedState Expected state of the sidebar audit(checks).
- */
-async function checkAuditState(store, expectedState) {
-  info("Checking audit state.");
-  await waitUntilState(store, ({ details }) => {
-    const { audit } = details;
-
-    for (const key in expectedState) {
-      const expected = expectedState[key];
-      if (expected && typeof expected === "object") {
-        if (JSON.stringify(audit[key], parseNumReplacer) !==
-            JSON.stringify(expected, parseNumReplacer)) {
-          return false;
-        }
-      } else if (audit && audit[key] !== expected) {
-        return false;
-      }
-    }
-
-    ok(true, "Audit state is correct.");
-    return true;
-  });
-}
-
-/**
  * Check the state of the accessibility sidebar.
  * @param  {Object} store         React store for the panel (includes store for
  *                                the sidebar).
  * @param  {Object} expectedState Expected state of the sidebar.
  */
 async function checkSidebarState(store, expectedState) {
   info("Checking sidebar state.");
   await waitUntilState(store, ({ details }) => {
@@ -344,63 +298,58 @@ function selectRow(doc, rowNumber) {
 
 /**
  * Toggle an expandable tree row.
  * @param  {document} doc       panel documnent.
  * @param  {Number}   rowNumber number of the row/tree node to be toggled.
  */
 async function toggleRow(doc, rowNumber) {
   const win = doc.defaultView;
-  const row = doc.querySelectorAll(".treeRow")[rowNumber];
-  const twisty = row.querySelector(".theme-twisty");
+  const twisty = doc.querySelectorAll(".theme-twisty")[rowNumber];
   const expected = !twisty.classList.contains("open");
 
   info(`${expected ? "Expanding" : "Collapsing"} row ${rowNumber}.`);
 
   EventUtils.sendMouseEvent({ type: "click" }, twisty, win);
   await BrowserTestUtils.waitForCondition(() =>
     !twisty.classList.contains("devtools-throbber") &&
     expected === twisty.classList.contains("open"), "Twisty updated.");
 }
 
 /**
- * Iterate over setups/tests structure and test the state of the
+ * Iterate over actions/tests structure and test the state of the
  * accessibility panel.
  * @param  {JSON}   tests test data that has the format of:
  *                    {
  *                      desc     {String}    description for better logging
- *                      setup    {Function}  An optional setup that needs to be
+ *                      action   {Function}  An optional action that needs to be
  *                                           performed before the state of the
  *                                           tree and the sidebar can be checked
  *                      expected {JSON}      An expected states for the tree and
  *                                           the sidebar
  *                    }
  * @param  {Object} env  contains all relevant environment objects (same
  *                       structure as the return value of 'addTestTab' funciton)
  */
 async function runA11yPanelTests(tests, env) {
-  for (const { desc, setup, expected } of tests) {
+  for (const { desc, action, expected } of tests) {
     info(desc);
 
-    if (setup) {
-      await setup(env);
+    if (action) {
+      await action(env);
     }
 
-    const { tree, sidebar, audit } = expected;
+    const { tree, sidebar } = expected;
     if (tree) {
       await checkTreeState(env.doc, tree);
     }
 
     if (sidebar) {
       await checkSidebarState(env.store, sidebar);
     }
-
-    if (typeof audit !== "undefined") {
-      await checkAuditState(env.store, audit);
-    }
   }
 }
 
 /**
  * Build a valid URL from an HTML snippet.
  * @param  {String} uri HTML snippet
  * @return {String}     built URL
  */
@@ -408,17 +357,17 @@ function buildURL(uri) {
   return `data:text/html;charset=UTF-8,${encodeURIComponent(uri)}`;
 }
 
 /**
  * Add a test task based on the test structure and a test URL.
  * @param  {JSON}   tests  test data that has the format of:
  *                    {
  *                      desc     {String}    description for better logging
- *                      setup   {Function}   An optional setup that needs to be
+ *                      action   {Function}  An optional action that needs to be
  *                                           performed before the state of the
  *                                           tree and the sidebar can be checked
  *                      expected {JSON}      An expected states for the tree and
  *                                           the sidebar
  *                    }
  * @param {String}  uri    test URL
  * @param {String}  msg    a message that is printed for the test
  */
--- a/devtools/client/accessibility/test/mochitest/chrome.ini
+++ b/devtools/client/accessibility/test/mochitest/chrome.ini
@@ -1,11 +1,8 @@
 [DEFAULT]
 support-files =
   head.js
-  contrast.snapshots.js
-  !/devtools/client/shared/components/test/mochitest/head.js
 
-[test_accessible_contrast.html]
 [test_accessible_learnMoreLink.html]
 [test_accessible_openLink.html]
 [test_accessible_relations.html]
 [test_accessible_row_context_menu.html]
deleted file mode 100644
--- a/devtools/client/accessibility/test/mochitest/contrast.snapshots.js
+++ /dev/null
@@ -1,272 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-"use strict";
-
-window._snapshots = {
-  "ColorContrastAccessibility error render.": {
-    "type": "div",
-    "props": {
-      "role": "presentation",
-      "className": "accessibility-color-contrast-check",
-    },
-    "children": [
-      {
-        "type": "h3",
-        "props": {
-          "className": "accessibility-color-contrast-header",
-        },
-        "children": [
-          "Color and Contrast",
-        ],
-      },
-      {
-        "type": "div",
-        "props": {
-          "role": "presentation",
-          "className": "accessibility-color-contrast",
-        },
-        "children": [
-          {
-            "type": "span",
-            "props": {
-              "className": "accessibility-color-contrast-error",
-              "role": "presentation",
-            },
-            "children": [
-              "Unable to calculate",
-            ],
-          },
-        ],
-      },
-    ],
-  },
-  "ColorContrastAccessibility basic render.": {
-    "type": "div",
-    "props": {
-      "role": "presentation",
-      "className": "accessibility-color-contrast-check",
-    },
-    "children": [
-      {
-        "type": "h3",
-        "props": {
-          "className": "accessibility-color-contrast-header",
-        },
-        "children": [
-          "Color and Contrast",
-        ],
-      },
-      {
-        "type": "div",
-        "props": {
-          "role": "presentation",
-          "className": "accessibility-color-contrast",
-        },
-        "children": [
-          {
-            "type": "span",
-            "props": {
-              "className": "accessibility-contrast-value fail",
-              "role": "presentation",
-              "style": {
-                "--accessibility-contrast-color": "rgba(255,0,0,1)",
-                "--accessibility-contrast-bg": "rgba(255,255,255,1)",
-              },
-            },
-            "children": [
-              "4.00",
-            ],
-          },
-        ],
-      },
-      {
-        "type": "p",
-        "props": {
-          "className": "accessibility-color-contrast-annotation",
-        },
-        "children": [
-          "Does not meet WCAG standards for accessible text. ",
-          {
-            "type": "a",
-            "props": {
-              "className": "link",
-              "href": "https://developer.mozilla.org/docs/Web/Accessibility/" +
-                      "Understanding_WCAG/Perceivable/Color_contrast?utm_source=" +
-                      "devtools&utm_medium=a11y-panel-checks-color-contrast",
-              "onClick": "openDocOnClick(event) {\n    event.preventDefault();\n    " +
-                         "openDocLink(event.target.href);\n  }",
-            },
-            "children": [
-              "Learn more",
-            ],
-          },
-          "",
-        ],
-      },
-    ],
-  },
-  "ColorContrastAccessibility range render.": {
-    "type": "div",
-    "props": {
-      "role": "presentation",
-      "className": "accessibility-color-contrast-check",
-    },
-    "children": [
-      {
-        "type": "h3",
-        "props": {
-          "className": "accessibility-color-contrast-header",
-        },
-        "children": [
-          "Color and Contrast",
-        ],
-      },
-      {
-        "type": "div",
-        "props": {
-          "role": "presentation",
-          "className": "accessibility-color-contrast",
-        },
-        "children": [
-          {
-            "type": "span",
-            "props": {
-              "className": "accessibility-contrast-value fail",
-              "role": "presentation",
-              "style": {
-                "--accessibility-contrast-color": "rgba(128,128,128,1)",
-                "--accessibility-contrast-bg": "rgba(219,106,116,1)",
-              },
-            },
-            "children": [
-              "1.19",
-            ],
-          },
-          {
-            "type": "div",
-            "props": {
-              "role": "presentation",
-              "className": "accessibility-color-contrast-separator",
-            },
-            "children": null,
-          },
-          {
-            "type": "span",
-            "props": {
-              "className": "accessibility-contrast-value fail",
-              "role": "presentation",
-              "style": {
-                "--accessibility-contrast-color": "rgba(128,128,128,1)",
-                "--accessibility-contrast-bg": "rgba(156,145,211,1)",
-              },
-            },
-            "children": [
-              "1.39",
-            ],
-          },
-        ],
-      },
-      {
-        "type": "p",
-        "props": {
-          "className": "accessibility-color-contrast-annotation",
-        },
-        "children": [
-          "Does not meet WCAG standards for accessible text. ",
-          {
-            "type": "a",
-            "props": {
-              "className": "link",
-              "href": "https://developer.mozilla.org/docs/Web/Accessibility/" +
-                      "Understanding_WCAG/Perceivable/Color_contrast?utm_source=" +
-                      "devtools&utm_medium=a11y-panel-checks-color-contrast",
-              "onClick": "openDocOnClick(event) {\n    event.preventDefault();\n    " +
-                         "openDocLink(event.target.href);\n  }",
-            },
-            "children": [
-              "Learn more",
-            ],
-          },
-          "",
-        ],
-      },
-    ],
-  },
-  "ColorContrastAccessibility large text render.": {
-    "type": "div",
-    "props": {
-      "role": "presentation",
-      "className": "accessibility-color-contrast-check",
-    },
-    "children": [
-      {
-        "type": "h3",
-        "props": {
-          "className": "accessibility-color-contrast-header",
-        },
-        "children": [
-          "Color and Contrast",
-        ],
-      },
-      {
-        "type": "div",
-        "props": {
-          "role": "presentation",
-          "className": "accessibility-color-contrast",
-        },
-        "children": [
-          {
-            "type": "span",
-            "props": {
-              "className": "accessibility-contrast-value AA",
-              "role": "presentation",
-              "style": {
-                "--accessibility-contrast-color": "rgba(255,0,0,1)",
-                "--accessibility-contrast-bg": "rgba(255,255,255,1)",
-              },
-            },
-            "children": [
-              "4.00",
-            ],
-          },
-          {
-            "type": "span",
-            "props": {
-              "className": "accessibility-color-contrast-large-text",
-              "role": "presentation",
-              "title": "Text is 14 point and bold or larger, or 18 point or larger.",
-            },
-            "children": [
-              "large text",
-            ],
-          },
-        ],
-      },
-      {
-        "type": "p",
-        "props": {
-          "className": "accessibility-color-contrast-annotation",
-        },
-        "children": [
-          "Meets WCAG AA standards for accessible text. ",
-          {
-            "type": "a",
-            "props": {
-              "className": "link",
-              "href": "https://developer.mozilla.org/docs/Web/Accessibility/" +
-                      "Understanding_WCAG/Perceivable/Color_contrast?utm_source=" +
-                      "devtools&utm_medium=a11y-panel-checks-color-contrast",
-              "onClick": "openDocOnClick(event) {\n    event.preventDefault();\n    " +
-                         "openDocLink(event.target.href);\n  }",
-            },
-            "children": [
-              "Learn more",
-            ],
-          },
-          "",
-        ],
-      },
-    ],
-  },
-};
deleted file mode 100644
--- a/devtools/client/accessibility/test/mochitest/test_accessible_contrast.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<!DOCTYPE HTML>
-<html>
-<!--
-Test that Color Contrast component renders correctly.
--->
-<head>
-  <meta charset="utf-8">
-  <title>Color Contrast accessibility component test</title>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-  <link rel="stylesheet" href="chrome://devtools/skin/light-theme.css" type="text/css">
-</head>
-<body>
-<pre id="test">
-<script src="head.js" type="application/javascript"></script>
-<script src="chrome://mochitests/content/chrome/devtools/client/shared/components/test/mochitest/head.js" type="application/javascript"/>
-<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" type="application/javascript"></script>
-<script src="contrast.snapshots.js" type="application/javascript"></script>
-<script type="application/javascript">
-
-"use strict";
-
-/* global matchSnapshot */
-
-window.onload = async function() {
-  try {
-    const React = browserRequire("devtools/client/shared/vendor/react");
-    const { ColorContrastCheck } = browserRequire(
-      "devtools/client/accessibility/components/ColorContrastAccessibility");
-
-    matchSnapshot("ColorContrastAccessibility error render.",
-      React.createElement(ColorContrastCheck, { error: true })
-    );
-
-    matchSnapshot("ColorContrastAccessibility basic render.",
-      React.createElement(ColorContrastCheck, {
-        "value": 4.00,
-        "color": [255, 0, 0, 1],
-        "backgroundColor": [255, 255, 255, 1],
-        "isLargeText": false,
-      })
-    );
-
-    matchSnapshot("ColorContrastAccessibility range render.",
-      React.createElement(ColorContrastCheck, {
-        "min": 1.19,
-        "max": 1.39,
-        "color": [128, 128, 128, 1],
-        "backgroundColorMin": [219, 106, 116, 1],
-        "backgroundColorMax": [156, 145, 211, 1],
-        "isLargeText": false,
-      })
-    );
-
-    matchSnapshot("ColorContrastAccessibility large text render.",
-      React.createElement(ColorContrastCheck, {
-        "value": 4.00,
-        "color": [255, 0, 0, 1],
-        "backgroundColor": [255, 255, 255, 1],
-        "isLargeText": true,
-      })
-    );
-  } catch (e) {
-    ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
-  } finally {
-    SimpleTest.finish();
-  }
-};
-</script>
-</pre>
-</body>
-</html>
--- a/devtools/client/accessibility/test/mochitest/test_accessible_learnMoreLink.html
+++ b/devtools/client/accessibility/test/mochitest/test_accessible_learnMoreLink.html
@@ -60,32 +60,29 @@ window.onload = async function() {
 
       ok(onClickUrl !== checker, "Link was clicked");
       is(onClickUrl, expectedUrl, "Correct URL is opened");
 
       browserWindow.openWebLinkIn = defaultOpenWebLinkIn;
     }
 
     const href = "http://example.com/";
-    const className = "test-class";
     const l10n = new MockL10N({
       message: "This is a message that contains a link. %S",
       link: "Learn more",
     });
     const learnMoreLink = LearnMoreLink(
-      { href, className, l10n, learnMoreStringKey: "link", messageStringKey: "message" });
+      { href, l10n, learnMoreStringKey: "link", messageStringKey: "message" });
     ok(LearnMoreLink, "Should be able to create LearnMoreLink instances");
 
     ReactDOM.render(learnMoreLink, document.body);
     const p = document.querySelector("p");
     is(p.textContent, "This is a message that contains a link. Learn more",
       "Text content for the whole paragraph is correct");
 
-    is(p.className, className, "Class name is set correctly.");
-
     const link = p.querySelector(".link");
     ok(link, "Link was rendered");
     is(link.textContent, "Learn more", "Text content for link is correct");
 
     testLinkClicked(link, href);
   } catch (e) {
     ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
   } finally {
--- a/devtools/client/locales/en-US/accessibility.properties
+++ b/devtools/client/locales/en-US/accessibility.properties
@@ -101,53 +101,8 @@ accessibility.description.general.p2=Acc
 # when accessibility service description is provided when a client is connected
 # to an older version of accessibility actor.
 accessibility.description.oldVersion=You are connected to a debugger server that is too old. To use Accessibility panel, please connect to the latest debugger server version.
 
 # LOCALIZATION NOTE (accessibility.tree.menu.printToJSON): A title text used when a
 # context menu item for printing an accessible tree to JSON is rendered after triggering a
 # context menu for an accessible tree row.
 accessibility.tree.menu.printToJSON=Print to JSON
-
-# LOCALIZATION NOTE (accessibility.checks): A title text used for header for checks
-# section in Accessibility details sidebar.
-accessibility.checks=Checks
-
-# LOCALIZATION NOTE (accessibility.checks.empty): A title text used for indicating that
-# accessibility checks for a node yielded no results and another node should be
-# selected.
-accessibility.checks.empty=Select another node to continue.
-
-# LOCALIZATION NOTE (accessibility.contrast.header): A title text used for header for
-# checks related to color and contrast.
-accessibility.contrast.header=Color and Contrast
-
-# LOCALIZATION NOTE (accessibility.contrast.error): A title text for the color
-# contrast ratio, used when the tool is unable to calculate the contrast ratio value.
-accessibility.contrast.error=Unable to calculate
-
-# LOCALIZATION NOTE (accessibility.contrast.large.text): A title text for the color
-# contrast ratio label indicating that the color contrast criteria used is if for large
-# text. This is lower case because it's used as a label for a tree item in accessibility
-# tree.
-accessibility.contrast.large.text=large text
-
-# LOCALIZATION NOTE (accessibility.contrast.large.title): A title text for the tooltip
-# used for the large text label (see accessibility.contrast.large.text).
-accessibility.contrast.large.title=Text is 14 point and bold or larger, or 18 point or larger.
-
-# LOCALIZATION NOTE (accessibility.contrast.annotation.AA): A title text for the paragraph
-# describing that the given colour contrast satisfies AA standard from Web Content
-# Accessibility Guidelines. %S in the content will be replaced by a link at run time
-# with the accessibility.learnMore string.
-accessibility.contrast.annotation.AA=Meets WCAG AA standards for accessible text. %S
-
-# LOCALIZATION NOTE (accessibility.contrast.annotation.AAA): A title text for the
-# paragraph describing that the given colour contrast satisfies AAA standard from Web
-# Content Accessibility Guidelines. %S in the content will be replaced by a link at run
-# time with the accessibility.learnMore string.
-accessibility.contrast.annotation.AAA=Meets WCAG AAA standards for accessible text. %S
-
-# LOCALIZATION NOTE (accessibility.contrast.annotation.fail): A title text for the
-# paragraph describing that the given colour contrast fails to meet the minimum level from
-# Web Content Accessibility Guidelines. %S in the content will be replaced by a link at
-# run time with the accessibility.learnMore string.
-accessibility.contrast.annotation.fail=Does not meet WCAG standards for accessible text. %S
deleted file mode 100644
--- a/devtools/client/shared/components/Accordion.css
+++ /dev/null
@@ -1,63 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Accordion */
-
-:root {
-  --accordion-header-background: var(--theme-toolbar-background);
-  --disclosure-arrow: #b2b2b2;
-}
-
-:root.theme-dark {
-  --accordion-header-background: #222225;
-  --disclosure-arrow: #7f7f81;
-}
-
-.accordion {
-  background-color: var(--theme-sidebar-background);
-  list-style-type: none;
-  padding: 0;
-  margin: 0;
-  width: 100%;
-  white-space: nowrap;
-  overflow: auto;
-}
-
-.accordion .accordion-header {
-  background-color: var(--accordion-header-background);
-  border-bottom: 1px solid var(--theme-splitter-color);
-  display: flex;
-  font-size: 12px;
-  transition: all 0.25s ease;
-  height: 24px;
-  width: calc(100% - 4px);
-  padding-inline-end: 4px;
-  align-items: center;
-  margin: 0px;
-  font-weight: normal;
-
-  -moz-user-select: none;
-  cursor: default;
-}
-
-.accordion .accordion-header .theme-twisty {
-  width: 20px;
-}
-
-.accordion .accordion-header:hover {
-  background-color: var(--theme-toolbar-background-hover);
-}
-
-.accordion .accordion-content:not(:empty) {
-  font-size: 12px;
-  overflow: auto;
-}
-
-.accordion > li > .accordion-content:not(:empty) {
-  border-bottom: 1px solid var(--theme-splitter-color);
-}
-
-.accordion li:last-child .accordion-content {
-  border-bottom: none;
-}
deleted file mode 100644
--- a/devtools/client/shared/components/Accordion.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-
-"use strict";
-
-const { Component, cloneElement } = require("devtools/client/shared/vendor/react");
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { ul, li, h2, div } = require("devtools/client/shared/vendor/react-dom-factories");
-
-class Accordion extends Component {
-  static get propTypes() {
-    return {
-      // A list of all items to be rendered using an Accordion component.
-      items: PropTypes.arrayOf(PropTypes.shape({
-        component: PropTypes.object,
-        componentProps: PropTypes.object,
-        buttons: PropTypes.arrayOf(PropTypes.object),
-        className: PropTypes.string,
-        header: PropTypes.string.isRequired,
-        labelledby: PropTypes.string.isRequired,
-        onToggle: PropTypes.func,
-        opened: PropTypes.bool.isRequired,
-      })).isRequired,
-    };
-  }
-
-  constructor(props) {
-    super(props);
-
-    this.state = {
-      opened: Object.assign({}, props.items.map(item => item.opened)),
-    };
-  }
-
-  /**
-   * Expand or collapse an accordian list item.
-   * @param  {Number} i
-   *         Index of the item to be collapsed/expanded.
-   */
-  handleHeaderClick(i) {
-    const { opened } = this.state;
-    this.setState({
-      opened: {
-        ...opened,
-        [i]: !opened[i],
-      },
-    });
-
-    const item = this.props.items[i];
-    if (item.onToggle) {
-      item.onToggle(!opened[i]);
-    }
-  }
-
-  /**
-   * Expand or collapse an accordian list item with keyboard.
-   * @param  {Event} e
-   *         Keyboard event.
-   * @param  {Number} i
-   *         Index of the item to be collapsed/expanded.
-   */
-  onHandleHeaderKeyDown(e, i) {
-    if (e && (e.key === " " || e.key === "Enter")) {
-      this.handleHeaderClick(i);
-    }
-  }
-
-  renderContainer(item, i) {
-    const { buttons, className, component, componentProps, labelledby, header } = item;
-    const opened = this.state.opened[i];
-
-    return (
-      li(
-        {
-          className,
-          "aria-expanded": opened,
-          "aria-labelledby": labelledby,
-        },
-        h2(
-          {
-            className: "accordion-header",
-            id: labelledby,
-            tabIndex: 0,
-            onKeyDown: e => this.onHandleHeaderKeyDown(e, i),
-            onClick: () => this.handleHeaderClick(i),
-          },
-          div(
-            {
-              className: `arrow theme-twisty${opened ? " open" : ""}`,
-              role: "presentation",
-            }
-          ),
-          header,
-          buttons && div(
-            {
-              className: "header-buttons",
-              role: "presentation",
-            },
-            buttons
-          ),
-        ),
-        opened && div(
-          {
-            className: "accordion-content",
-            role: "presentation",
-          },
-          cloneElement(component, componentProps || {})
-        )
-      )
-    );
-  }
-
-  render() {
-    return (
-      ul({
-        className: "accordion",
-        tabIndex: -1,
-      },
-        this.props.items.map((item, i) => this.renderContainer(item, i)))
-    );
-  }
-}
-
-module.exports = Accordion;
deleted file mode 100644
--- a/devtools/client/shared/components/List.css
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* List */
-
-.list {
-  background-color: var(--theme-sidebar-background);
-  list-style-type: none;
-  padding: 0;
-  margin: 0;
-  width: 100%;
-  white-space: nowrap;
-  overflow: auto;
-}
-
-.list:focus, .list .list-item-content:focus {
-  outline: 0;
-}
-
-.list::-moz-focus-inner, .list .list-item-content::-moz-focus-inner {
-  border: 0;
-}
-
-.list li.current {
-  background-color: var(--theme-toolbar-hover);
-}
-
-.list:focus li.current, .list li.active.current {
-  background-color: var(--theme-emphasized-splitter-color);
-}
-
-.list:focus li:not(.current):hover,
-.list:not(:focus) li:not(.active):hover {
-  background-color: var(--theme-selection-background-hover);
-}
-
-.list .list-item-content:not(:empty) {
-  font-size: 12px;
-  overflow: auto;
-}
deleted file mode 100644
--- a/devtools/client/shared/components/List.js
+++ /dev/null
@@ -1,378 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
-
-"use strict";
-
-const {
-  createFactory,
-  createRef,
-  Component,
-  cloneElement,
-} = require("devtools/client/shared/vendor/react");
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { ul, li, div } = require("devtools/client/shared/vendor/react-dom-factories");
-
-const { scrollIntoView } = require("devtools/client/shared/scroll");
-
-loader.lazyRequireGetter(this, "focusableSelector", "devtools/client/shared/focus", true);
-
-class ListItemClass extends Component {
-  static get propTypes() {
-    return {
-      active: PropTypes.bool,
-      current: PropTypes.bool,
-      onClick: PropTypes.func,
-      item: PropTypes.shape({
-        component: PropTypes.object,
-        componentProps: PropTypes.object,
-        className: PropTypes.string,
-      }).isRequired,
-    };
-  }
-
-  constructor(props) {
-    super(props);
-
-    this.contentRef = createRef();
-
-    this._setTabbableState = this._setTabbableState.bind(this);
-    this._onKeyDown = this._onKeyDown.bind(this);
-    this._wrapMoveFocus = this._wrapMoveFocus.bind(this);
-  }
-
-  componentDidMount() {
-    this._setTabbableState();
-  }
-
-  componentDidUpdate() {
-    this._setTabbableState();
-  }
-
-  /**
-   * Get a list of all elements that are focusable with a keyboard inside the list item.
-   */
-  getFocusableElements() {
-    return Array.from(this.contentRef.current.querySelectorAll(focusableSelector));
-  }
-
-  /**
-   * Wrap and move keyboard focus to first/last focusable element inside the list item to
-   * prevent the focus from escaping the list item container.
-   * element).
-   *
-   * @param  {DOMNode} current  currently focused element
-   * @param  {Boolean} back     direction
-   * @return {Boolean}          true there is a newly focused element.
-   */
-  _wrapMoveFocus(current, back) {
-    const elms = this.getFocusableElements();
-    let next;
-
-    if (elms.length === 0) {
-      return false;
-    }
-
-    if (back) {
-      if (elms.indexOf(current) === 0) {
-        next = elms[elms.length - 1];
-        next.focus();
-      }
-    } else if (elms.indexOf(current) === elms.length - 1) {
-      next = elms[0];
-      next.focus();
-    }
-
-    return !!next;
-  }
-
-  _onKeyDown(event) {
-    const { target, key, shiftKey } = event;
-
-    if (key !== "Tab") {
-      return;
-    }
-
-    const focusMoved = this._wrapMoveFocus(target, shiftKey);
-    if (focusMoved) {
-      // Focus was moved to the begining/end of the list, so we need to prevent the
-      // default focus change that would happen here.
-      event.preventDefault();
-    }
-
-    event.stopPropagation();
-  }
-
-  /**
-   * Makes sure that none of the focusable elements inside the list item container are
-   * tabbable if the list item is not active. If the list item is active and focus is
-   * outside its container, focus on the first focusable element inside.
-   */
-  _setTabbableState() {
-    const elms = this.getFocusableElements();
-    if (elms.length === 0) {
-      return;
-    }
-
-    if (!this.props.active) {
-      elms.forEach(elm => elm.setAttribute("tabindex", "-1"));
-      return;
-    }
-
-    if (!elms.includes(document.activeElement)) {
-      elms[0].focus();
-    }
-  }
-
-  render() {
-    const { active, item, current, onClick } = this.props;
-    const { className, component, componentProps } = item;
-
-    return (
-      li({
-        className: `${className}${current ? " current" : ""}${active ? " active" : ""}`,
-        id: item.key,
-        onClick,
-        onKeyDownCapture: active && this._onKeyDown,
-      },
-        div({
-          className: "list-item-content",
-          role: "presentation",
-          ref: this.contentRef,
-        }, cloneElement(component, componentProps || {}))
-      )
-    );
-  }
-}
-
-const ListItem = createFactory(ListItemClass);
-
-class List extends Component {
-  static get propTypes() {
-    return {
-      // A list of all items to be rendered using a List component.
-      items: PropTypes.arrayOf(PropTypes.shape({
-        component: PropTypes.object,
-        componentProps: PropTypes.object,
-        className: PropTypes.string,
-        key: PropTypes.string.isRequired,
-      })).isRequired,
-
-      // Note: the two properties below are mutually exclusive. Only one of the
-      // label properties is necessary.
-      // ID of an element whose textual content serves as an accessible label for
-      // a list.
-      labelledBy: PropTypes.string,
-
-      // Accessibility label for a list widget.
-      label: PropTypes.string,
-    };
-  }
-
-  constructor(props) {
-    super(props);
-
-    this.listRef = createRef();
-
-    this.state = {
-      active: null,
-      current: null,
-      mouseDown: false,
-    };
-
-    this._setCurrentItem = this._setCurrentItem.bind(this);
-    this._preventArrowKeyScrolling = this._preventArrowKeyScrolling.bind(this);
-    this._preventDefaultAndStopPropagation =
-      this._preventDefaultAndStopPropagation.bind(this);
-    this._onKeyDown = this._onKeyDown.bind(this);
-  }
-
-  shouldComponentUpdate(nextProps, nextState) {
-    const { active, current, mouseDown } = this.state;
-
-    return current !== nextState.current ||
-           active !== nextState.active ||
-           mouseDown === nextState.mouseDown;
-  }
-
-  _preventArrowKeyScrolling(e) {
-    switch (e.key) {
-      case "ArrowUp":
-      case "ArrowDown":
-      case "ArrowLeft":
-      case "ArrowRight":
-        this._preventDefaultAndStopPropagation(e);
-        break;
-    }
-  }
-
-  _preventDefaultAndStopPropagation(e) {
-    e.preventDefault();
-    e.stopPropagation();
-    if (e.nativeEvent) {
-      if (e.nativeEvent.preventDefault) {
-        e.nativeEvent.preventDefault();
-      }
-      if (e.nativeEvent.stopPropagation) {
-        e.nativeEvent.stopPropagation();
-      }
-    }
-  }
-
-  /**
-   * Sets the passed in item to be the current item.
-   *
-   * @param {null|Number} index
-   *        The index of the item in to be set as current, or undefined to unset the
-   *        current item.
-   */
-  _setCurrentItem(index = -1, options = {}) {
-    const item = this.props.items[index];
-    if (item !== undefined && !options.preventAutoScroll) {
-      const element = document.getElementById(item.key);
-      scrollIntoView(element, {
-        ...options,
-        container: this.listRef.current,
-      });
-    }
-
-    const state = {};
-    if (this.state.active != undefined) {
-      state.active = null;
-      if (this.listRef.current !== document.activeElement) {
-        this.listRef.current.focus();
-      }
-    }
-
-    if (this.state.current !== index) {
-      this.setState({
-        ...state,
-        current: index,
-      });
-    }
-  }
-
-  /**
-   * Handles key down events in the list's container.
-   *
-   * @param {Event} e
-   */
-  _onKeyDown(e) {
-    const { active, current } = this.state;
-    if (current == null) {
-      return;
-    }
-
-    if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
-      return;
-    }
-
-    this._preventArrowKeyScrolling(e);
-
-    const { length } = this.props.items;
-    switch (e.key) {
-      case "ArrowUp":
-        (current > 0) && this._setCurrentItem(current - 1, { alignTo: "top" });
-        break;
-
-      case "ArrowDown":
-        (current < length - 1) && this._setCurrentItem(
-          current + 1, { alignTo: "bottom" });
-        break;
-
-      case "Home":
-        this._setCurrentItem(0, { alignTo: "top" });
-        break;
-
-      case "End":
-        this._setCurrentItem(length - 1, { alignTo: "bottom" });
-        break;
-
-      case "Enter":
-      case " ":
-        // On space or enter make current list item active. This means keyboard focus
-        // handling is passed on to the component within the list item.
-        if (document.activeElement === this.listRef.current) {
-          this._preventDefaultAndStopPropagation(e);
-          if (active !== current) {
-            this.setState({ active: current });
-          }
-        }
-        break;
-
-      case "Escape":
-        // If current list item is active, make it inactive and let keyboard focusing be
-        // handled normally.
-        this._preventDefaultAndStopPropagation(e);
-        if (active != null) {
-          this.setState({ active: null });
-        }
-
-        this.listRef.current.focus();
-        break;
-    }
-  }
-
-  render() {
-    const { active, current } = this.state;
-    const { items } = this.props;
-
-    return (
-      ul({
-        ref: this.listRef,
-        className: "list",
-        tabIndex: 0,
-        onKeyDown: this._onKeyDown,
-        onKeyPress: this._preventArrowKeyScrolling,
-        onKeyUp: this._preventArrowKeyScrolling,
-        onMouseDown: () => this.setState({ mouseDown: true }),
-        onMouseUp: () => this.setState({ mouseDown: false }),
-        onFocus: () => {
-          if (current != null || this.state.mouseDown) {
-            return;
-          }
-
-          // Only set default current to the first list item if current item is
-          // not yet set and the focus event is not the result of a mouse
-          // interarction.
-          this._setCurrentItem(0);
-        },
-        onClick: () => {
-          // Focus should always remain on the list container itself.
-          this.listRef.current.focus();
-        },
-        onBlur: e => {
-          if (active != null) {
-            const { relatedTarget } = e;
-            if (!this.listRef.current.contains(relatedTarget)) {
-              this.setState({ active: null });
-            }
-          }
-        },
-        "aria-label": this.props.label,
-        "aria-labelledby": this.props.labelledBy,
-        "aria-activedescendant": (current != null) ? items[current].key : null,
-      },
-        items.map((item, index) => {
-          return ListItem({
-            item,
-            current: index === current,
-            active: index === active,
-            // We make a key unique depending on whether the list item is in active or
-            // inactive state to make sure that it is actually replaced and the tabbable
-            // state is reset.
-            key: `${item.key}-${index === active ? "active" : "inactive"}`,
-            // Since the user just clicked the item, there's no need to check if it should
-            // be scrolled into view.
-            onClick: () => this._setCurrentItem(index, { preventAutoScroll: true }),
-          });
-        })
-      )
-    );
-  }
-}
-
-module.exports = {
-  ListItem: ListItemClass,
-  List,
-};
--- a/devtools/client/shared/components/VirtualizedTree.js
+++ b/devtools/client/shared/components/VirtualizedTree.js
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 /* eslint-env browser */
 "use strict";
 
 const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
-const { scrollIntoView } = require("devtools/client/shared/scroll");
 
 const AUTO_EXPAND_DEPTH = 0;
 const NUMBER_OF_OFFSCREEN_ITEMS = 1;
 
 /**
  * A fast, generic, expandable and collapsible tree component.
  *
  * This tree component is fast: it can handle trees with *many* items. It only
@@ -425,24 +424,32 @@ class Tree extends Component {
    *
    * @param {Number} index
    *        The index of the item in a full DFS traversal (ignoring collapsed
    *        nodes). Ignored if `item` is undefined.
    *
    * @param {Object|undefined} item
    *        The item to be focused, or undefined to focus no item.
    */
-  _focus(index, item, options = {}) {
-    if (item !== undefined && !options.preventAutoScroll) {
-      const treeElement = this.refs.tree;
-      const element = document.getElementById(this.props.getKey(item));
-      scrollIntoView(element, {
-        ...options,
-        container: treeElement,
-      });
+  _focus(index, item) {
+    if (item !== undefined) {
+      const itemStartPosition = index * this.props.itemHeight;
+      const itemEndPosition = (index + 1) * this.props.itemHeight;
+
+      // Note that if the height of the viewport (this.state.height) is less
+      // than `this.props.itemHeight`, we could accidentally try and scroll both
+      // up and down in a futile attempt to make both the item's start and end
+      // positions visible. Instead, give priority to the start of the item by
+      // checking its position first, and then using an "else if", rather than
+      // a separate "if", for the end position.
+      if (this.state.scroll > itemStartPosition) {
+        this.refs.tree.scrollTo(0, itemStartPosition);
+      } else if ((this.state.scroll + this.state.height) < itemEndPosition) {
+        this.refs.tree.scrollTo(0, itemEndPosition - this.state.height);
+      }
     }
 
     if (this.props.onFocus) {
       this.props.onFocus(item);
     }
   }
 
   /**
@@ -541,23 +548,23 @@ class Tree extends Component {
   _activateNode() {
     if (this.props.onActivate) {
       this.props.onActivate(this.props.focused);
     }
   }
 
   _focusFirstNode() {
     const traversal = this._dfsFromRoots();
-    this._focus(0, traversal[0].item, { alignTo: "top" });
+    this._focus(0, traversal[0].item);
   }
 
   _focusLastNode() {
     const traversal = this._dfsFromRoots();
     const lastIndex = traversal.length - 1;
-    this._focus(lastIndex, traversal[lastIndex].item, { alignTo: "bottom" });
+    this._focus(lastIndex, traversal[lastIndex].item);
   }
 
   /**
    * Sets the previous node relative to the currently focused item, to focused.
    */
   _focusPrevNode() {
     // Start a depth first search and keep going until we reach the currently
     // focused node. Focus the previous node in the DFS, if it exists. If it
@@ -576,17 +583,17 @@ class Tree extends Component {
       prev = item;
       prevIndex = i;
     }
 
     if (prev === undefined) {
       return;
     }
 
-    this._focus(prevIndex, prev, { alignTo: "top" });
+    this._focus(prevIndex, prev);
   }
 
   /**
    * Handles the down arrow key which will focus either the next child
    * or sibling row.
    */
   _focusNextNode() {
     // Start a depth first search and keep going until we reach the currently
@@ -600,17 +607,17 @@ class Tree extends Component {
     while (i < length) {
       if (traversal[i].item === this.props.focused) {
         break;
       }
       i++;
     }
 
     if (i + 1 < traversal.length) {
-      this._focus(i + 1, traversal[i + 1].item, { alignTo: "bottom" });
+      this._focus(i + 1, traversal[i + 1].item);
     }
   }
 
   /**
    * Handles the left arrow key, going back up to the current rows'
    * parent row.
    */
   _focusParentNode() {
@@ -623,17 +630,17 @@ class Tree extends Component {
     const length = traversal.length;
     let parentIndex = 0;
     for (; parentIndex < length; parentIndex++) {
       if (traversal[parentIndex].item === parent) {
         break;
       }
     }
 
-    this._focus(parentIndex, parent, { alignTo: "top" });
+    this._focus(parentIndex, parent);
   }
 
   render() {
     const traversal = this._dfsFromRoots();
 
     // 'begin' and 'end' are the index of the first (at least partially) visible item
     // and the index after the last (at least partially) visible item, respectively.
     // `NUMBER_OF_OFFSCREEN_ITEMS` is removed from `begin` and added to `end` so that
@@ -675,19 +682,17 @@ class Tree extends Component {
         depth,
         id: key,
         renderItem: this.props.renderItem,
         focused: focused === item,
         expanded: this.props.isExpanded(item),
         hasChildren: !!this.props.getChildren(item).length,
         onExpand: this._onExpand,
         onCollapse: this._onCollapse,
-        // Since the user just clicked the node, there's no need to check if
-        // it should be scrolled into view.
-        onClick: () => this._focus(begin + i, item, { preventAutoScroll: true }),
+        onClick: () => this._focus(begin + i, item),
       }));
     }
 
     nodes.push(dom.div({
       key: "bottom-spacer",
       role: "presentation",
       style: {
         padding: 0,
--- a/devtools/client/shared/components/moz.build
+++ b/devtools/client/shared/components/moz.build
@@ -9,23 +9,19 @@ DIRS += [
     'reps',
     'splitter',
     'tabs',
     'throttling',
     'tree',
 ]
 
 DevToolsModules(
-    'Accordion.css',
-    'Accordion.js',
     'AutoCompletePopup.js',
     'Frame.js',
     'HSplitBox.js',
-    'List.css',
-    'List.js',
     'MdnLink.css',
     'MdnLink.js',
     'NotificationBox.css',
     'NotificationBox.js',
     'SearchBox.js',
     'Sidebar.js',
     'SidebarToggle.css',
     'SidebarToggle.js',
deleted file mode 100644
--- a/devtools/client/shared/components/test/mochitest/accordion.snapshots.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-"use strict";
-
-window._snapshots = {
-  "Accordion basic render.": {
-    "type": "ul",
-    "props": {
-      "className": "accordion",
-      "tabIndex": -1,
-    },
-    "children": [
-      {
-        "type": "li",
-        "props": {
-          "className": "accordion-item-1",
-          "aria-expanded": false,
-          "aria-labelledby": "label-id-1",
-        },
-        "children": [
-          {
-            "type": "h2",
-            "props": {
-              "className": "accordion-header",
-              "id": "label-id-1",
-              "tabIndex": 0,
-              "onKeyDown": "e => this.onHandleHeaderKeyDown(e, i)",
-              "onClick": "() => this.handleHeaderClick(i)",
-            },
-            "children": [
-              {
-                "type": "div",
-                "props": {
-                  "className": "arrow theme-twisty",
-                  "role": "presentation",
-                },
-                "children": null,
-              },
-              "Test Accordion Item 1",
-            ],
-          },
-        ],
-      },
-      {
-        "type": "li",
-        "props": {
-          "className": "accordion-item-2",
-          "aria-expanded": false,
-          "aria-labelledby": "label-id-2",
-        },
-        "children": [
-          {
-            "type": "h2",
-            "props": {
-              "className": "accordion-header",
-              "id": "label-id-2",
-              "tabIndex": 0,
-              "onKeyDown": "e => this.onHandleHeaderKeyDown(e, i)",
-              "onClick": "() => this.handleHeaderClick(i)",
-            },
-            "children": [
-              {
-                "type": "div",
-                "props": {
-                  "className": "arrow theme-twisty",
-                  "role": "presentation",
-                },
-                "children": null,
-              },
-              "Test Accordion Item 2",
-              {
-                "type": "div",
-                "props": {
-                  "className": "header-buttons",
-                  "role": "presentation",
-                },
-                "children": [
-                  {
-                    "type": "button",
-                    "props": {},
-                    "children": null,
-                  },
-                ],
-              },
-            ],
-          },
-        ],
-      },
-      {
-        "type": "li",
-        "props": {
-          "className": "accordion-item-3",
-          "aria-expanded": true,
-          "aria-labelledby": "label-id-3",
-        },
-        "children": [
-          {
-            "type": "h2",
-            "props": {
-              "className": "accordion-header",
-              "id": "label-id-3",
-              "tabIndex": 0,
-              "onKeyDown": "e => this.onHandleHeaderKeyDown(e, i)",
-              "onClick": "() => this.handleHeaderClick(i)",
-            },
-            "children": [
-              {
-                "type": "div",
-                "props": {
-                  "className": "arrow theme-twisty open",
-                  "role": "presentation",
-                },
-                "children": null,
-              },
-              "Test Accordion Item 3",
-            ],
-          },
-          {
-            "type": "div",
-            "props": {
-              "className": "accordion-content",
-              "role": "presentation",
-            },
-            "children": [
-              {
-                "type": "div",
-                "props": {},
-                "children": null,
-              },
-            ],
-          },
-        ],
-      },
-    ],
-  },
-};
--- a/devtools/client/shared/components/test/mochitest/chrome.ini
+++ b/devtools/client/shared/components/test/mochitest/chrome.ini
@@ -1,19 +1,15 @@
 [DEFAULT]
 support-files =
   head.js
-  accordion.snapshots.js
 
-[test_accordion.html]
 [test_frame_01.html]
 [test_frame_02.html]
 [test_HSplitBox_01.html]
-[test_list.html]
-[test_list_keyboard.html]
 [test_notification_box_01.html]
 [test_notification_box_02.html]
 [test_notification_box_03.html]
 [test_searchbox.html]
 [test_searchbox-with-autocomplete.html]
 [test_sidebar_toggle.html]
 [test_smart-trace-grouping.html]
 [test_smart-trace-source-maps.html]
--- a/devtools/client/shared/components/test/mochitest/head.js
+++ b/devtools/client/shared/components/test/mochitest/head.js
@@ -1,15 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 /* eslint no-unused-vars: [2, {"vars": "local"}] */
 
-/* global _snapshots */
-
 "use strict";
 
 var { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm");
 var { Assert } = require("resource://testing-common/Assert.jsm");
 var { gDevTools } = require("devtools/client/framework/devtools");
 var { BrowserLoader } = ChromeUtils.import("resource://devtools/client/shared/browser-loader.js");
 var promise = require("promise");
 var defer = require("devtools/shared/defer");
@@ -27,25 +25,19 @@ var { require: browserRequire } = Browse
 
 const React = browserRequire("devtools/client/shared/vendor/react");
 const ReactDOM = browserRequire("devtools/client/shared/vendor/react-dom");
 const dom = browserRequire("devtools/client/shared/vendor/react-dom-factories");
 const TestUtils = browserRequire("devtools/client/shared/vendor/react-dom-test-utils");
 
 const ShallowRenderer =
   browserRequire("devtools/client/shared/vendor/react-test-renderer-shallow");
-const TestRenderer =
-  browserRequire("devtools/client/shared/vendor/react-test-renderer");
 
 var EXAMPLE_URL = "http://example.com/browser/browser/devtools/shared/test/";
 
-SimpleTest.registerCleanupFunction(() => {
-  window._snapshots = null;
-});
-
 function forceRender(comp) {
   return setState(comp, {})
     .then(() => setState(comp, {}));
 }
 
 // All tests are asynchronous.
 SimpleTest.waitForExplicitFinish();
 
@@ -262,34 +254,8 @@ async function waitFor(condition = () =>
   do {
     const res = condition();
     if (res) {
       return res;
     }
     await new Promise(resolve => setTimeout(resolve, delay));
   } while (true);
 }
-
-/**
- * Matches a component tree rendererd using TestRenderer to a given expected JSON
- * snapshot.
- * @param  {String} name
- *         Name of the function derived from a test [step] name.
- * @param  {Object} el
- *         React element to be rendered using TestRenderer.
- */
-function matchSnapshot(name, el) {
-  if (!_snapshots) {
-    is(false, "No snapshots were loaded into test.");
-  }
-
-  const snapshot = _snapshots[name];
-  if (!snapshot) {
-    is(false, `Snapshot for "${name}" not found.`);
-  }
-
-  const renderer = TestRenderer.create(el, {});
-  const tree = renderer.toJSON();
-
-  is(JSON.stringify(tree, (key, value) =>
-    (typeof value === "function") ? value.toString() : value),
-     JSON.stringify(snapshot), name);
-}
deleted file mode 100644
--- a/devtools/client/shared/components/test/mochitest/test_accordion.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<!DOCTYPE HTML>
-<html>
-<!--
-Test that Accordion renders correctly.
--->
-<head>
-  <meta charset="utf-8">
-  <title>Accordion component test</title>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-  <link rel="stylesheet" href="chrome://devtools/skin/light-theme.css" type="text/css">
-</head>
-<body>
-<pre id="test">
-<script src="head.js" type="application/javascript"></script>
-<script src="accordion.snapshots.js" type="application/javascript"></script>
-<script type="application/javascript">
-
-"use strict";
-
-window.onload = async function() {
-  try {
-    const { button, div } = require("devtools/client/shared/vendor/react-dom-factories");
-    const sinon = require("resource://testing-common/sinon-2.3.2.js");
-    const React = browserRequire("devtools/client/shared/vendor/react");
-    const {
-      Simulate,
-      renderIntoDocument,
-      findAllInRenderedTree,
-    } = browserRequire("devtools/client/shared/vendor/react-dom-test-utils");
-    const Accordion =
-      browserRequire("devtools/client/shared/components/Accordion");
-
-    const testItems = [
-      {
-        header: "Test Accordion Item 1",
-        className: "accordion-item-1",
-        component: div({}),
-        opened: false,
-        labelledby: "label-id-1",
-        onToggle: sinon.spy(),
-      },
-      {
-        header: "Test Accordion Item 2",
-        className: "accordion-item-2",
-        component: div({}),
-        buttons: button({}),
-        opened: false,
-        labelledby: "label-id-2",
-        onToggle: sinon.spy(),
-      },
-      {
-        header: "Test Accordion Item 3",
-        className: "accordion-item-3",
-        component: div({}),
-        opened: true,
-        labelledby: "label-id-3",
-        onToggle: sinon.spy(),
-      },
-    ];
-
-    const accordion = React.createElement(Accordion, { items: testItems });
-
-    matchSnapshot("Accordion basic render.", accordion);
-
-    const tree = renderIntoDocument(accordion);
-    const headers = findAllInRenderedTree(tree, c => c.className === "accordion-header");
-
-    Simulate.click(headers[0]);
-    ok(testItems[0].onToggle.calledWith(true), "Handle click and onToggle.");
-    ok(testItems[1].onToggle.notCalled,
-       "onToggle wasn't called on element we didn't click on.");
-
-    isDeeply(tree.state, { opened: { 0: true, 1: false, 2: true }},
-             "State updated correctly");
-
-    Simulate.keyDown(headers[0], { key: "Enter" });
-    ok(testItems[0].onToggle.calledWith(false), "Handle click and onToggle.");
-    isDeeply(tree.state, { opened: { 0: false, 1: false, 2: true } },
-             "State updated correctly");
-
-    Simulate.keyDown(headers[1], { key: " " });
-    ok(testItems[1].onToggle.calledWith(true), "Handle click and onToggle.");
-    isDeeply(tree.state, { opened: { 0: false, 1: true, 2: true } },
-             "State updated correctly");
-  } catch (e) {
-    ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
-  } finally {
-    SimpleTest.finish();
-  }
-};
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/devtools/client/shared/components/test/mochitest/test_list.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<!DOCTYPE HTML>
-<html>
-<!--
-Test that List renders correctly.
--->
-<head>
-  <meta charset="utf-8">
-  <title>List component test</title>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-  <link rel="stylesheet" href="chrome://devtools/skin/light-theme.css" type="text/css">
-</head>
-<body>
-<pre id="test">
-<script src="head.js" type="application/javascript"></script>
-<script src="list.snapshots.js" type="application/javascript"></script>
-<script type="application/javascript">
-
-"use strict";
-
-window.onload = async function() {
-  try {
-    const { div } = require("devtools/client/shared/vendor/react-dom-factories");
-    const React = browserRequire("devtools/client/shared/vendor/react");
-    const {
-      Simulate,
-      renderIntoDocument,
-      findRenderedDOMComponentWithClass,
-      scryRenderedDOMComponentsWithTag,
-      scryRenderedComponentsWithType,
-    } = browserRequire("devtools/client/shared/vendor/react-dom-test-utils");
-    const { List, ListItem } =
-      browserRequire("devtools/client/shared/components/List");
-
-    const testItems = [
-      {
-        component: div({ className: "item-1" }, "Test List Item 1"),
-        className: "list-item-1",
-        key: "list-item-1",
-      },
-      {
-        component: div({ className: "item-2" }, "Test List Item 2"),
-        className: "list-item-2",
-        key: "list-item-2",
-      },
-      {
-        component: div({ className: "item-3" }, "Test List Item 3"),
-        className: "list-item-3",
-        key: "list-item-3",
-      },
-    ];
-
-    const listReactEl = React.createElement(List, {
-      items: testItems,
-      labelledBy: "test-labelledby",
-    });
-
-    const list = renderIntoDocument(listReactEl);
-    const listEl = findRenderedDOMComponentWithClass(list, "list");
-    const items = scryRenderedComponentsWithType(list, ListItem);
-    let itemEls = scryRenderedDOMComponentsWithTag(list, "li");
-
-    function testCurrent(index) {
-      is(list.state.current, index, "Correct current item.");
-      is(listEl.getAttribute("aria-activedescendant"), testItems[index].key,
-         "Correct active descendant.");
-    }
-
-    is(items.length, 3, "Correct number of list item components in tree.");
-    is(itemEls.length, 3, "Correct number of list items is rendered.");
-    info("Testing initial tree properties.");
-    for (let index = 0; index < items.length; index++) {
-      const item = items[index];
-      const itemEl = itemEls[index];
-      const { active, current, item: itemProp } = item.props;
-      const content = itemEl.querySelector(".list-item-content");
-
-      is(active, false, "Correct active state.");
-      is(current, false, "Correct current state.");
-      is(itemProp, testItems[index], "Correct rendered item.");
-      is(item.contentRef.current, content, "Correct content ref.");
-
-      is(itemEl.className, testItems[index].className, "Correct list item class.");
-      is(itemEl.id, testItems[index].key, "Correct list item it.");
-      is(content.getAttribute("role"), "presentation", "Correct content role.");
-
-      is(content.innerHTML,
-         `<div class="item-${index + 1}">Test List Item ${index + 1}</div>`,
-         "Content rendered correctly.");
-    }
-
-    is(list.state.current, null, "Current item is not set by default.");
-    is(list.state.active, null, "Active item is not set by default.");
-    is(list.listRef.current, listEl, "Correct list ref.");
-
-    is(listEl.className, "list", "Correct list class.");
-    is(listEl.tabIndex, 0, "List is focusable.");
-    ok(!listEl.hasAttribute("aria-label"), "List has no label.");
-    is(listEl.getAttribute("aria-labelledby"), "test-labelledby",
-       "Correct list labelled by attribute.");
-    ok(!listEl.hasAttribute("aria-activedescendant"),
-      "No active descendant set by default.");
-
-    Simulate.focus(listEl);
-    testCurrent(0);
-
-    Simulate.click(itemEls[2]);
-    testCurrent(2);
-
-    Simulate.blur(listEl);
-    testCurrent(2);
-
-    Simulate.focus(listEl);
-    testCurrent(2);
-  } catch (e) {
-    ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
-  } finally {
-    SimpleTest.finish();
-  }
-};
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/devtools/client/shared/components/test/mochitest/test_list_keyboard.html
+++ /dev/null
@@ -1,283 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<!DOCTYPE HTML>
-<html>
-<!--
-Test that List component has working keyboard interactions.
--->
-<head>
-  <meta charset="utf-8">
-  <title>List component keyboard test</title>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-  <link rel="stylesheet" href="chrome://devtools/skin/light-theme.css" type="text/css">
-</head>
-<body>
-<pre id="test">
-<script src="head.js" type="application/javascript"></script>
-<script type="application/javascript">
-
-"use strict";
-
-window.onload = function() {
-  try {
-    const { a, button, div } =
-      require("devtools/client/shared/vendor/react-dom-factories");
-    const React = browserRequire("devtools/client/shared/vendor/react");
-    const {
-      Simulate,
-      findRenderedDOMComponentWithClass,
-      findRenderedDOMComponentWithTag,
-      scryRenderedDOMComponentsWithTag,
-    } = browserRequire("devtools/client/shared/vendor/react-dom-test-utils");
-    const { List } =
-      browserRequire("devtools/client/shared/components/List");
-
-    const testItems = [
-      {
-        component: div({}, "Test List Item 1"),
-        className: "list-item-1",
-        key: "list-item-1",
-      },
-      {
-        component: div({},
-          "Test List Item 2",
-          a({ href: "#" }, "Focusable 1"),
-          button({ }, "Focusable 2")),
-        className: "list-item-2",
-        key: "list-item-2",
-      },
-      {
-        component: div({}, "Test List Item 3"),
-        className: "list-item-3",
-        key: "list-item-3",
-      },
-    ];
-
-    const list = React.createElement(List, {
-      items: testItems,
-      labelledby: "test-labelledby",
-    });
-
-    const tree = ReactDOM.render(list, document.body);
-    const listEl = findRenderedDOMComponentWithClass(tree, "list");
-    const items = scryRenderedDOMComponentsWithTag(tree, "li");
-    const defaultFocus = listEl.ownerDocument.body;
-
-    function blurEl(el) {
-      // Simulate.blur does not seem to update the activeElement.
-      el.blur();
-    }
-
-    function focusEl(el) {
-      // Simulate.focus does not seem to update the activeElement.
-      el.focus();
-    }
-
-    const tests = [{
-      name: "Test default List state. Keyboard focus is set to document body by default.",
-      state: { current: null, active: null },
-      activeElement: defaultFocus,
-    }, {
-      name: "Current item must be set to the first list item on initial focus. " +
-            "Keyboard focus should be set on list's conatiner (<ul>).",
-      action: () => focusEl(listEl),
-      activeElement: listEl,
-      state: { current: 0 },
-    }, {
-      name: "Current item should remain set even when the list is blured. " +
-            "Keyboard focus should be set back to document body.",
-      action: () => blurEl(listEl),
-      state: { current: 0 },
-      activeElement: defaultFocus,
-    }, {
-      name: "Unset list's current state.",
-      action: () => tree.setState({ current: null }),
-      state: { current: null },
-    }, {
-      name: "Current item must be re-set again to the first list item on initial " +
-            "focus. Keyboard focus should be set on list's conatiner (<ul>).",
-      action: () => focusEl(listEl),
-      activeElement: listEl,
-      state: { current: 0 },
-    }, {
-      name: "Current item should be updated to next on ArrowDown.",
-      event: { type: "keyDown", el: listEl, options: { key: "ArrowDown" }},
-      state: { current: 1 },
-    }, {
-      name: "Current item should be updated to last on ArrowDown.",
-      event: { type: "keyDown", el: listEl, options: { key: "ArrowDown" }},
-      state: { current: 2 },
-    }, {
-      name: "Current item should remain on last on ArrowDown.",
-      event: { type: "keyDown", el: listEl, options: { key: "ArrowDown" }},
-      state: { current: 2 },
-    }, {
-      name: "Current item should be updated to previous on ArrowUp.",
-      event: { type: "keyDown", el: listEl, options: { key: "ArrowUp" }},
-      state: { current: 1 },
-    }, {
-      name: "Current item should be updated to first on ArrowUp.",
-      event: { type: "keyDown", el: listEl, options: { key: "ArrowUp" }},
-      state: { current: 0 },
-    }, {
-      name: "Current item should remain on first on ArrowUp.",
-      event: { type: "keyDown", el: listEl, options: { key: "ArrowUp" }},
-      state: { current: 0 },
-    }, {
-      name: "Current item should be updated to last on End.",
-      event: { type: "keyDown", el: listEl, options: { key: "End" }},
-      state: { current: 2 },
-    }, {
-      name: "Current item should be updated to first on Home.",
-      event: { type: "keyDown", el: listEl, options: { key: "Home" }},
-      state: { current: 0 },
-    }, {
-      name: "Current item should be set as active on Enter.",
-      event: { type: "keyDown", el: listEl, options: { key: "Enter" }},
-      state: { current: 0, active: 0 },
-      activeElement: listEl,
-    }, {
-      name: "Active item should be unset on Escape.",
-      event: { type: "keyDown", el: listEl, options: { key: "Escape" }},
-      state: { current: 0, active: null },
-    }, {
-      name: "Current item should be set as active on Space.",
-      event: { type: "keyDown", el: listEl, options: { key: " " }},
-      state: { current: 0, active: 0 },
-      activeElement: listEl,
-    }, {
-      name: "Current item should unset when focus leaves the list.",
-      action: () => blurEl(listEl),
-      state: { current: 0, active: null },
-      activeElement: defaultFocus,
-    }, {
-      name: "Keyboard focus should be set on list's conatiner (<ul>) on focus.",
-      action: () => focusEl(listEl),
-      activeElement: listEl,
-    }, {
-      name: "Current item should be updated to next on ArrowDown.",
-      event: { type: "keyDown", el: listEl, options: { key: "ArrowDown" }},
-      state: { current: 1, active: null },
-    }, {
-      name: "Current item should be set as active on Enter. Keyboard focus should be " +
-            "set on the first focusable element inside the list item, if available.",
-      event: { type: "keyDown", el: listEl, options: { key: "Enter" }},
-      state: { current: 1, active: 1 },
-      get activeElement() {
-        // When list item becomes active/inactive, it is replaced with a newly rendered
-        // one.
-        return findRenderedDOMComponentWithTag(tree, "a");
-      },
-    }, {
-      name: "Keyboard focus should be set to next tabbable element inside the active " +
-            "list item on Tab.",
-      action() {
-        synthesizeKey("KEY_Tab");
-      },
-      state: { current: 1, active: 1 },
-      get activeElement() {
-        // When list item becomes active/inactive, it is replaced with a newly rendered
-        // one.
-        return findRenderedDOMComponentWithTag(tree, "button");
-      },
-    }, {
-      name: "Keyboard focus should wrap inside the list item when focused on last " +
-            "tabbable element.",
-      action() {
-        synthesizeKey("KEY_Tab");
-      },
-      state: { current: 1, active: 1 },
-      get activeElement() {
-        return findRenderedDOMComponentWithTag(tree, "a");
-      },
-    }, {
-      name: "Keyboard focus should wrap inside the list item when focused on first " +
-            "tabbable element.",
-      action() {
-        synthesizeKey("KEY_Tab", { shiftKey: true });
-      },
-      state: { current: 1, active: 1 },
-      get activeElement() {
-        return findRenderedDOMComponentWithTag(tree, "button");
-      },
-    }, {
-      name: "Active item should be unset on Escape. Focus should move back to the " +
-            "list container.",
-      event: { type: "keyDown", el: listEl, options: { key: "Escape" }},
-      state: { current: 1, active: null },
-      activeElement: listEl,
-    }, {
-      name: "Current item should be set as active on Space. Keyboard focus should be " +
-            "set on the first focusable element inside the list item, if available.",
-      event: { type: "keyDown", el: listEl, options: { key: " " }},
-      state: { current: 1, active: 1 },
-      get activeElement() {
-        // When list item becomes active/inactive, it is replaced with a newly rendered
-        // one.
-        return findRenderedDOMComponentWithTag(tree, "a");
-      },
-    }, {
-      name: "Current item should remain set even when the list is blured. " +
-            "Keyboard focus should be set back to document body.",
-      action: () => listEl.ownerDocument.activeElement.blur(),
-      state: { current: 1, active: null, },
-      activeElement: defaultFocus,
-    }, {
-      name: "Keyboard focus should be set on list's conatiner (<ul>) on focus.",
-      action: () => focusEl(listEl),
-      state: { current: 1, active: null },
-      activeElement: listEl,
-    }, {
-      name: "Current item should be updated to previous on ArrowUp.",
-      event: { type: "keyDown", el: listEl, options: { key: "ArrowUp" }},
-      state: { current: 0, active: null },
-    }, {
-      name: "Current item should be set as active on Enter.",
-      event: { type: "keyDown", el: listEl, options: { key: "Enter" }},
-      state: { current: 0, active: 0 },
-      activeElement: listEl,
-    }, {
-      name: "Keyboard focus should move to another focusable element outside of the " +
-            "list when there's nothing to focus on inside the list item.",
-      action() {
-        synthesizeKey("KEY_Tab", { shiftKey: true });
-      },
-      state: { current: 0, active: null },
-      activeElement: listEl.ownerDocument.documentElement,
-    }];
-
-    for (const test of tests) {
-      const { action, condition, event, state, name } = test;
-
-      is(listEl, findRenderedDOMComponentWithClass(tree, "list"), "Sanity check");
-
-      info(name);
-      if (event) {
-        const { type, options, el } = event;
-        Simulate[type](el, options);
-      } else if (action) {
-        action();
-      }
-
-      if (test.activeElement) {
-        is(listEl.ownerDocument.activeElement, test.activeElement,
-           "Focus is set correctly.");
-      }
-
-      for (let key in state) {
-        is(tree.state[key], state[key], `${key} state is correct.`);
-      }
-    }
-  } catch (e) {
-    ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
-  } finally {
-    SimpleTest.finish();
-  }
-};
-</script>
-</pre>
-</body>
-</html>
--- a/devtools/client/shared/components/test/mochitest/test_tree_11.html
+++ b/devtools/client/shared/components/test/mochitest/test_tree_11.html
@@ -8,25 +8,24 @@ Test that when an item in the Tree compo
 -->
 <head>
   <meta charset="utf-8">
   <title>Tree component test</title>
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
   <link rel="stylesheet" href="chrome://devtools/skin/light-theme.css" type="text/css">
   <style>
-   .tree {
-     height: 30px;
-     overflow: auto;
-     display: block;
-   }
-
-   .tree-node {
-     font-size: 10px;
-     height: 10px;
+   * {
+       margin: 0;
+       padding: 0;
+       height: 30px;
+       max-height: 30px;
+       min-height: 30px;
+       font-size: 10px;
+       overflow: auto;
    }
   </style>
 </head>
 <body>
 <pre id="test">
 <script src="head.js" type="application/javascript"></script>
 <script type="application/javascript">
 window.onload = async function () {
--- a/devtools/client/shared/components/test/mochitest/test_tree_13.html
+++ b/devtools/client/shared/components/test/mochitest/test_tree_13.html
@@ -8,24 +8,19 @@ Test trees have the correct scroll posit
 -->
 <head>
   <meta charset="utf-8">
   <title>Tree component test</title>
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
   <style>
    .tree {
-     height: 50px;
-     overflow: auto;
-     display: block;
-   }
-
-   .tree-node {
-     font-size: 10px;
-     height: 10px;
+       height: 50px;
+       overflow: auto;
+       display: block;
    }
   </style>
 </head>
 <body>
 <pre id="test">
 <script src="head.js" type="application/javascript"></script>
 <script type="application/javascript">
 
--- a/devtools/client/shared/scroll.js
+++ b/devtools/client/shared/scroll.js
@@ -59,62 +59,11 @@ define(function(require, exports, module
       if (yAllowed && (topToBottom <= 0 || bottomToTop >= 0)) {
         const x = win.scrollX;
         const y = win.scrollY + clientRect.top -
           (win.innerHeight - elem.offsetHeight) / 2;
         win.scroll(Object.assign({left: x, top: y}, options));
       }
     }
   }
-
-  function closestScrolledParent(node) {
-    if (node == null) {
-      return null;
-    }
-
-    if (node.scrollHeight > node.clientHeight) {
-      return node;
-    }
-
-    return closestScrolledParent(node.parentNode);
-  }
-
-  /**
-   * Scrolls the element into view if it is not visible.
-   *
-   * @param {DOMNode|undefined} element
-   *        The item to be scrolled to.
-   *
-   * @param {Object|undefined} options
-   *        An options object which can contain:
-   *          - container: possible scrollable container. If it is not scrollable, we will
-   *                       look it up.
-   *          - alignTo:   "top" or "bottom" to indicate if we should scroll the element
-   *                       to the top or the bottom of the scrollable container when the
-   *                       element is off canvas.
-   */
-  function scrollIntoView(element, options = {}) {
-    if (!element) {
-      return;
-    }
-
-    const { alignTo, container } = options;
-
-    const { top, bottom } = element.getBoundingClientRect();
-    const scrolledParent = closestScrolledParent(container || element.parentNode);
-    const scrolledParentRect = scrolledParent ? scrolledParent.getBoundingClientRect() :
-                                                null;
-    const isVisible = !scrolledParent ||
-      (top >= scrolledParentRect.top && bottom <= scrolledParentRect.bottom);
-
-    if (isVisible) {
-      return;
-    }
-
-    const scrollToTop = alignTo ?
-      alignTo === "top" : !scrolledParentRect || top < scrolledParentRect.top;
-    element.scrollIntoView(scrollToTop);
-  }
-
   // Exports from this module
   module.exports.scrollIntoViewIfNeeded = scrollIntoViewIfNeeded;
-  module.exports.scrollIntoView = scrollIntoView;
 });
--- a/devtools/client/shared/vendor/REACT_UPGRADING.md
+++ b/devtools/client/shared/vendor/REACT_UPGRADING.md
@@ -75,12 +75,11 @@ cp build/dist/react.production.min.js <g
 cp build/dist/react-dom.production.min.js <gecko-dev>/devtools/client/shared/vendor/react-dom.js
 cp build/dist/react-dom-server.browser.production.min.js <gecko-dev>/devtools/client/shared/vendor/react-dom-server.js
 cp build/dist/react-dom-test-utils.production.min.js <gecko-dev>/devtools/client/shared/vendor/react-dom-test-utils.js
 cp build/dist/react.development.js <gecko-dev>/devtools/client/shared/vendor/react-dev.js
 cp build/dist/react-dom.development.js <gecko-dev>/devtools/client/shared/vendor/react-dom-dev.js
 cp build/dist/react-dom-server.browser.development.js <gecko-dev>/devtools/client/shared/vendor/react-dom-server-dev.js
 cp build/dist/react-dom-test-utils.development.js <gecko-dev>/devtools/client/shared/vendor/react-dom-test-utils-dev.js
 cp build/dist/react-test-renderer-shallow.production.min.js <gecko-dev>/devtools/client/shared/vendor/react-test-renderer-shallow.js
-cp build/dist/react-test-renderer.production.min.js <gecko-dev>/devtools/client/shared/vendor/react-test-renderer.js
 ```
 
 From this point we will no longer need your react repository so feel free to delete it.
--- a/devtools/client/shared/vendor/moz.build
+++ b/devtools/client/shared/vendor/moz.build
@@ -18,17 +18,16 @@ DevToolsModules(
     'react-dom-factories.js',
     'react-dom-server.js',
     'react-dom-test-utils.js',
     'react-dom.js',
     'react-prop-types.js',
     'react-redux.js',
     'react-router-dom.js',
     'react-test-renderer-shallow.js',
-    'react-test-renderer.js',
     'react.js',
     'redux.js',
     'reselect.js',
     'seamless-immutable.js',
     'WasmDis.js',
     'WasmParser.js',
 )
 
deleted file mode 100644
--- a/devtools/client/shared/vendor/react-test-renderer.js
+++ /dev/null
@@ -1,7820 +0,0 @@
-/** @license React v16.4.1
- * react-test-renderer.production.min.js
- *
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function (global, factory) {
-	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('devtools/client/shared/vendor/react')) :
-	typeof define === 'function' && define.amd ? define(['devtools/client/shared/vendor/react'], factory) :
-	(global.ReactTestRenderer = factory(global.React));
-}(this, (function (React) { 'use strict';
-
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
-
-
-
-function invariant(condition, format, a, b, c, d, e, f) {
-  if (!condition) {
-    var error;
-    if (format === undefined) {
-      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
-    } else {
-      var args = [a, b, c, d, e, f];
-      var argIndex = 0;
-      error = new Error(format.replace(/%s/g, function () {
-        return args[argIndex++];
-      }));
-      error.name = 'Invariant Violation';
-    }
-
-    error.framesToPop = 1; // we don't care about invariant's own frame
-    throw error;
-  }
-}
-
-var invariant_1 = invariant;
-
-// Relying on the `invariant()` implementation lets us
-// have preserve the format and params in the www builds.
-/**
- * WARNING: DO NOT manually require this module.
- * This is a replacement for `invariant(...)` used by the error code system
- * and will _only_ be required by the corresponding babel pass.
- * It always throws.
- */
-function reactProdInvariant(code) {
-  var argCount = arguments.length - 1;
-  var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
-  for (var argIdx = 0; argIdx < argCount; argIdx++) {
-    url += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
-  }
-  // Rename it so that our build transform doesn't atttempt
-  // to replace this invariant() call with reactProdInvariant().
-  var i = invariant_1;
-  i(false,
-  // The error code is intentionally part of the message (and
-  // not the format argument) so that we could deduplicate
-  // different errors in logs based on the code.
-  'Minified React error #' + code + '; visit %s ' + 'for the full message or use the non-minified dev environment ' + 'for full errors and additional helpful warnings. ', url);
-}
-
-var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
-var _assign = ReactInternals.assign;
-
-/**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
-
-/**
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
- * instance (key) and the internal representation (value). This allows public
- * methods to accept the user facing instance as an argument and map them back
- * to internal methods.
- *
- * Note that this module is currently shared and assumed to be stateless.
- * If this becomes an actual Map, that will break.
- */
-
-/**
- * This API should be called `delete` but we'd have to make sure to always
- * transform these to strings for IE support. When this transform is fully
- * supported we can rename it.
- */
-
-
-function get(key) {
-  return key._reactInternalFiber;
-}
-
-
-
-function set(key, value) {
-  key._reactInternalFiber = value;
-}
-
-var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
-var ReactCurrentOwner = ReactInternals$1.ReactCurrentOwner;
-
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var hasSymbol = typeof Symbol === 'function' && Symbol.for;
-
-var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
-var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
-var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
-var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
-var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
-var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
-var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
-var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
-var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
-var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol.for('react.timeout') : 0xead1;
-
-var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
-var FAUX_ITERATOR_SYMBOL = '@@iterator';
-
-function getIteratorFn(maybeIterable) {
-  if (maybeIterable === null || typeof maybeIterable === 'undefined') {
-    return null;
-  }
-  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
-  if (typeof maybeIterator === 'function') {
-    return maybeIterator;
-  }
-  return null;
-}
-
-function getComponentName(fiber) {
-  var type = fiber.type;
-
-  if (typeof type === 'function') {
-    return type.displayName || type.name;
-  }
-  if (typeof type === 'string') {
-    return type;
-  }
-  switch (type) {
-    case REACT_ASYNC_MODE_TYPE:
-      return 'AsyncMode';
-    case REACT_CONTEXT_TYPE:
-      return 'Context.Consumer';
-    case REACT_FRAGMENT_TYPE:
-      return 'ReactFragment';
-    case REACT_PORTAL_TYPE:
-      return 'ReactPortal';
-    case REACT_PROFILER_TYPE:
-      return 'Profiler(' + fiber.pendingProps.id + ')';
-    case REACT_PROVIDER_TYPE:
-      return 'Context.Provider';
-    case REACT_STRICT_MODE_TYPE:
-      return 'StrictMode';
-    case REACT_TIMEOUT_TYPE:
-      return 'Timeout';
-  }
-  if (typeof type === 'object' && type !== null) {
-    switch (type.$$typeof) {
-      case REACT_FORWARD_REF_TYPE:
-        var functionName = type.render.displayName || type.render.name || '';
-        return functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef';
-    }
-  }
-  return null;
-}
-
-var IndeterminateComponent = 0; // Before we know whether it is functional or class
-var FunctionalComponent = 1;
-var ClassComponent = 2;
-var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
-var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
-var HostComponent = 5;
-var HostText = 6;
-
-
-
-var Fragment = 10;
-var Mode = 11;
-var ContextConsumer = 12;
-var ContextProvider = 13;
-var ForwardRef = 14;
-var Profiler = 15;
-var TimeoutComponent = 16;
-
-// Don't change these two values. They're used by React Dev Tools.
-var NoEffect = /*              */0;
-var PerformedWork = /*         */1;
-
-// You can change the rest (and add more).
-var Placement = /*             */2;
-var Update = /*                */4;
-var PlacementAndUpdate = /*    */6;
-var Deletion = /*              */8;
-var ContentReset = /*          */16;
-var Callback = /*              */32;
-var DidCapture = /*            */64;
-var Ref = /*                   */128;
-var Snapshot = /*              */256;
-
-// Union of all host effects
-var HostEffectMask = /*        */511;
-
-var Incomplete = /*            */512;
-var ShouldCapture = /*         */1024;
-
-var MOUNTING = 1;
-var MOUNTED = 2;
-var UNMOUNTED = 3;
-
-function isFiberMountedImpl(fiber) {
-  var node = fiber;
-  if (!fiber.alternate) {
-    // If there is no alternate, this might be a new tree that isn't inserted
-    // yet. If it is, then it will have a pending insertion effect on it.
-    if ((node.effectTag & Placement) !== NoEffect) {
-      return MOUNTING;
-    }
-    while (node.return) {
-      node = node.return;
-      if ((node.effectTag & Placement) !== NoEffect) {
-        return MOUNTING;
-      }
-    }
-  } else {
-    while (node.return) {
-      node = node.return;
-    }
-  }
-  if (node.tag === HostRoot) {
-    // TODO: Check if this was a nested HostRoot when used with
-    // renderContainerIntoSubtree.
-    return MOUNTED;
-  }
-  // If we didn't hit the root, that means that we're in an disconnected tree
-  // that has been unmounted.
-  return UNMOUNTED;
-}
-
-function isFiberMounted(fiber) {
-  return isFiberMountedImpl(fiber) === MOUNTED;
-}
-
-function isMounted(component) {
-  var fiber = get(component);
-  if (!fiber) {
-    return false;
-  }
-  return isFiberMountedImpl(fiber) === MOUNTED;
-}
-
-function assertIsMounted(fiber) {
-  !(isFiberMountedImpl(fiber) === MOUNTED) ? reactProdInvariant('188') : void 0;
-}
-
-function findCurrentFiberUsingSlowPath(fiber) {
-  var alternate = fiber.alternate;
-  if (!alternate) {
-    // If there is no alternate, then we only need to check if it is mounted.
-    var state = isFiberMountedImpl(fiber);
-    !(state !== UNMOUNTED) ? reactProdInvariant('188') : void 0;
-    if (state === MOUNTING) {
-      return null;
-    }
-    return fiber;
-  }
-  // If we have two possible branches, we'll walk backwards up to the root
-  // to see what path the root points to. On the way we may hit one of the
-  // special cases and we'll deal with them.
-  var a = fiber;
-  var b = alternate;
-  while (true) {
-    var parentA = a.return;
-    var parentB = parentA ? parentA.alternate : null;
-    if (!parentA || !parentB) {
-      // We're at the root.
-      break;
-    }
-
-    // If both copies of the parent fiber point to the same child, we can
-    // assume that the child is current. This happens when we bailout on low
-    // priority: the bailed out fiber's child reuses the current child.
-    if (parentA.child === parentB.child) {
-      var child = parentA.child;
-      while (child) {
-        if (child === a) {
-          // We've determined that A is the current branch.
-          assertIsMounted(parentA);
-          return fiber;
-        }
-        if (child === b) {
-          // We've determined that B is the current branch.
-          assertIsMounted(parentA);
-          return alternate;
-        }
-        child = child.sibling;
-      }
-      // We should never have an alternate for any mounting node. So the only
-      // way this could possibly happen is if this was unmounted, if at all.
-      reactProdInvariant('188');
-    }
-
-    if (a.return !== b.return) {
-      // The return pointer of A and the return pointer of B point to different
-      // fibers. We assume that return pointers never criss-cross, so A must
-      // belong to the child set of A.return, and B must belong to the child
-      // set of B.return.
-      a = parentA;
-      b = parentB;
-    } else {
-      // The return pointers point to the same fiber. We'll have to use the
-      // default, slow path: scan the child sets of each parent alternate to see
-      // which child belongs to which set.
-      //
-      // Search parent A's child set
-      var didFindChild = false;
-      var _child = parentA.child;
-      while (_child) {
-        if (_child === a) {
-          didFindChild = true;
-          a = parentA;
-          b = parentB;
-          break;
-        }
-        if (_child === b) {
-          didFindChild = true;
-          b = parentA;
-          a = parentB;
-          break;
-        }
-        _child = _child.sibling;
-      }
-      if (!didFindChild) {
-        // Search parent B's child set
-        _child = parentB.child;
-        while (_child) {
-          if (_child === a) {
-            didFindChild = true;
-            a = parentB;
-            b = parentA;
-            break;
-          }
-          if (_child === b) {
-            didFindChild = true;
-            b = parentB;
-            a = parentA;
-            break;
-          }
-          _child = _child.sibling;
-        }
-        !didFindChild ? reactProdInvariant('189') : void 0;
-      }
-    }
-
-    !(a.alternate === b) ? reactProdInvariant('190') : void 0;
-  }
-  // If the root is not a host container, we're in a disconnected tree. I.e.
-  // unmounted.
-  !(a.tag === HostRoot) ? reactProdInvariant('188') : void 0;
-  if (a.stateNode.current === a) {
-    // We've determined that A is the current branch.
-    return fiber;
-  }
-  // Otherwise B has to be current branch.
-  return alternate;
-}
-
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
-
-
-
-var emptyObject = {};
-
-var emptyObject_1 = emptyObject;
-
-// Current virtual time
-var nowImplementation = function () {
-  return 0;
-};
-var scheduledCallback = null;
-var yieldedValues = null;
-
-function scheduleDeferredCallback$1(callback, options) {
-  scheduledCallback = callback;
-  var fakeCallbackId = 0;
-  return fakeCallbackId;
-}
-
-function cancelDeferredCallback$1(timeoutID) {
-  scheduledCallback = null;
-}
-
-function setNowImplementation(implementation) {
-  nowImplementation = implementation;
-}
-
-function flushAll() {
-  yieldedValues = null;
-  while (scheduledCallback !== null) {
-    var cb = scheduledCallback;
-    scheduledCallback = null;
-    cb({
-      timeRemaining: function () {
-        // Keep rendering until there's no more work
-        return 999;
-      },
-
-      // React's scheduler has its own way of keeping track of expired
-      // work and doesn't read this, so don't bother setting it to the
-      // correct value.
-      didTimeout: false
-    });
-  }
-  if (yieldedValues === null) {
-    // Always return an array.
-    return [];
-  }
-  return yieldedValues;
-}
-
-function flushThrough(expectedValues) {
-  var didStop = false;
-  yieldedValues = null;
-  while (scheduledCallback !== null && !didStop) {
-    var cb = scheduledCallback;
-    scheduledCallback = null;
-    cb({
-      timeRemaining: function () {
-        if (yieldedValues !== null && yieldedValues.length >= expectedValues.length) {
-          // We at least as many values as expected. Stop rendering.
-          didStop = true;
-          return 0;
-        }
-        // Keep rendering.
-        return 999;
-      },
-
-      // React's scheduler has its own way of keeping track of expired
-      // work and doesn't read this, so don't bother setting it to the
-      // correct value.
-      didTimeout: false
-    });
-  }
-  if (yieldedValues === null) {
-    // Always return an array.
-    yieldedValues = [];
-  }
-  for (var i = 0; i < expectedValues.length; i++) {
-    var expectedValue = '"' + expectedValues[i] + '"';
-    var yieldedValue = i < yieldedValues.length ? '"' + yieldedValues[i] + '"' : 'nothing';
-    if (yieldedValue !== expectedValue) {
-      var error = new Error('flushThrough expected to yield ' + expectedValue + ', but ' + yieldedValue + ' was yielded');
-      // Attach expected and yielded arrays,
-      // So the caller could pretty print the diff (if desired).
-      error.expectedValues = expectedValues;
-      error.actualValues = yieldedValues;
-      throw error;
-    }
-  }
-  return yieldedValues;
-}
-
-function yieldValue(value) {
-  if (yieldedValues === null) {
-    yieldedValues = [value];
-  } else {
-    yieldedValues.push(value);
-  }
-}
-
-function withCleanYields(fn) {
-  yieldedValues = [];
-  fn();
-  return yieldedValues;
-}
-
-// Renderers that don't support persistence
-// can re-export everything from this module.
-
-function shim() {
-  reactProdInvariant('270');
-}
-
-// Persistence (when unsupported)
-var supportsPersistence = false;
-var cloneInstance = shim;
-var createContainerChildSet = shim;
-var appendChildToContainerChildSet = shim;
-var finalizeContainerChildren = shim;
-var replaceContainerChildren = shim;
-
-// Renderers that don't support hydration
-// can re-export everything from this module.
-
-function shim$1() {
-  reactProdInvariant('272');
-}
-
-// Hydration (when unsupported)
-var supportsHydration = false;
-var canHydrateInstance = shim$1;
-var canHydrateTextInstance = shim$1;
-var getNextHydratableSibling = shim$1;
-var getFirstHydratableChild = shim$1;
-var hydrateInstance = shim$1;
-var hydrateTextInstance = shim$1;
-
-// Unused
-
-var UPDATE_SIGNAL = {};
-
-function getPublicInstance(inst) {
-  switch (inst.tag) {
-    case 'INSTANCE':
-      var _createNodeMock = inst.rootContainerInstance.createNodeMock;
-      return _createNodeMock({
-        type: inst.type,
-        props: inst.props
-      });
-    default:
-      return inst;
-  }
-}
-
-function appendChild(parentInstance, child) {
-  var index = parentInstance.children.indexOf(child);
-  if (index !== -1) {
-    parentInstance.children.splice(index, 1);
-  }
-  parentInstance.children.push(child);
-}
-
-function insertBefore(parentInstance, child, beforeChild) {
-  var index = parentInstance.children.indexOf(child);
-  if (index !== -1) {
-    parentInstance.children.splice(index, 1);
-  }
-  var beforeIndex = parentInstance.children.indexOf(beforeChild);
-  parentInstance.children.splice(beforeIndex, 0, child);
-}
-
-function removeChild(parentInstance, child) {
-  var index = parentInstance.children.indexOf(child);
-  parentInstance.children.splice(index, 1);
-}
-
-function getRootHostContext(rootContainerInstance) {
-  return emptyObject_1;
-}
-
-function getChildHostContext(parentHostContext, type, rootContainerInstance) {
-  return emptyObject_1;
-}
-
-function prepareForCommit(containerInfo) {
-  // noop
-}
-
-function resetAfterCommit(containerInfo) {
-  // noop
-}
-
-function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
-  return {
-    type: type,
-    props: props,
-    children: [],
-    rootContainerInstance: rootContainerInstance,
-    tag: 'INSTANCE'
-  };
-}
-
-function appendInitialChild(parentInstance, child) {
-  var index = parentInstance.children.indexOf(child);
-  if (index !== -1) {
-    parentInstance.children.splice(index, 1);
-  }
-  parentInstance.children.push(child);
-}
-
-function finalizeInitialChildren(testElement, type, props, rootContainerInstance, hostContext) {
-  return false;
-}
-
-function prepareUpdate(testElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
-  return UPDATE_SIGNAL;
-}
-
-function shouldSetTextContent(type, props) {
-  return false;
-}
-
-function shouldDeprioritizeSubtree(type, props) {
-  return false;
-}
-
-function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
-  return {
-    text: text,
-    tag: 'TEXT'
-  };
-}
-
-var isPrimaryRenderer = true;
-// This approach enables `now` to be mocked by tests,
-// Even after the reconciler has initialized and read host config values.
-var now = function () {
-  return nowImplementation();
-};
-var scheduleDeferredCallback = scheduleDeferredCallback$1;
-var cancelDeferredCallback = cancelDeferredCallback$1;
-
-// -------------------
-//     Mutation
-// -------------------
-
-var supportsMutation = true;
-
-function commitUpdate(instance, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
-  instance.type = type;
-  instance.props = newProps;
-}
-
-
-
-function commitTextUpdate(textInstance, oldText, newText) {
-  textInstance.text = newText;
-}
-
-function resetTextContent(testElement) {
-  // noop
-}
-
-var appendChildToContainer = appendChild;
-var insertInContainerBefore = insertBefore;
-var removeChildFromContainer = removeChild;
-
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-var describeComponentFrame = function (name, source, ownerName) {
-  return '\n    in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
-};
-
-function describeFiber(fiber) {
-  switch (fiber.tag) {
-    case IndeterminateComponent:
-    case FunctionalComponent:
-    case ClassComponent:
-    case HostComponent:
-      var owner = fiber._debugOwner;
-      var source = fiber._debugSource;
-      var name = getComponentName(fiber);
-      var ownerName = null;
-      if (owner) {
-        ownerName = getComponentName(owner);
-      }
-      return describeComponentFrame(name, source, ownerName);
-    default:
-      return '';
-  }
-}
-
-// This function can only be called with a work-in-progress fiber and
-// only during begin or complete phase. Do not call it under any other
-// circumstances.
-function getStackAddendumByWorkInProgressFiber(workInProgress) {
-  var info = '';
-  var node = workInProgress;
-  do {
-    info += describeFiber(node);
-    // Otherwise this return pointer might point to the wrong tree:
-    node = node.return;
-  } while (node);
-  return info;
-}
-
-var enableUserTimingAPI = false;
-var enableGetDerivedStateFromCatch = false;
-var enableSuspense = false;
-
-
-
-var enableProfilerTimer = false;
-
-// Only used in www builds.
-
-// Prefix measurements so that it's possible to filter them.
-// Longer prefixes are hard to read in DevTools.
-var reactEmoji = '\u269B';
-var warningEmoji = '\u26D4';
-var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
-
-// Keep track of current fiber so that we know the path to unwind on pause.
-// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
-var currentFiber = null;
-// If we're in the middle of user code, which fiber and method is it?
-// Reusing `currentFiber` would be confusing for this because user code fiber
-// can change during commit phase too, but we don't need to unwind it (since
-// lifecycles in the commit phase don't resemble a tree).
-var currentPhase = null;
-var currentPhaseFiber = null;
-// Did lifecycle hook schedule an update? This is often a performance problem,
-// so we will keep track of it, and include it in the report.
-// Track commits caused by cascading updates.
-var isCommitting = false;
-var hasScheduledUpdateInCurrentCommit = false;
-var hasScheduledUpdateInCurrentPhase = false;
-var commitCountInCurrentWorkLoop = 0;
-var effectCountInCurrentCommit = 0;
-var isWaitingForCallback = false;
-// During commits, we only show a measurement once per method name
-// to avoid stretch the commit phase with measurement overhead.
-var labelsInCurrentCommit = new Set();
-
-var formatMarkName = function (markName) {
-  return reactEmoji + ' ' + markName;
-};
-
-var formatLabel = function (label, warning) {
-  var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' ';
-  var suffix = warning ? ' Warning: ' + warning : '';
-  return '' + prefix + label + suffix;
-};
-
-var beginMark = function (markName) {
-  performance.mark(formatMarkName(markName));
-};
-
-var clearMark = function (markName) {
-  performance.clearMarks(formatMarkName(markName));
-};
-
-var endMark = function (label, markName, warning) {
-  var formattedMarkName = formatMarkName(markName);
-  var formattedLabel = formatLabel(label, warning);
-  try {
-    performance.measure(formattedLabel, formattedMarkName);
-  } catch (err) {}
-  // If previous mark was missing for some reason, this will throw.
-  // This could only happen if React crashed in an unexpected place earlier.
-  // Don't pile on with more errors.
-
-  // Clear marks immediately to avoid growing buffer.
-  performance.clearMarks(formattedMarkName);
-  performance.clearMeasures(formattedLabel);
-};
-
-var getFiberMarkName = function (label, debugID) {
-  return label + ' (#' + debugID + ')';
-};
-
-var getFiberLabel = function (componentName, isMounted, phase) {
-  if (phase === null) {
-    // These are composite component total time measurements.
-    return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']';
-  } else {
-    // Composite component methods.
-    return componentName + '.' + phase;
-  }
-};
-
-var beginFiberMark = function (fiber, phase) {
-  var componentName = getComponentName(fiber) || 'Unknown';
-  var debugID = fiber._debugID;
-  var isMounted = fiber.alternate !== null;
-  var label = getFiberLabel(componentName, isMounted, phase);
-
-  if (isCommitting && labelsInCurrentCommit.has(label)) {
-    // During the commit phase, we don't show duplicate labels because
-    // there is a fixed overhead for every measurement, and we don't
-    // want to stretch the commit phase beyond necessary.
-    return false;
-  }
-  labelsInCurrentCommit.add(label);
-
-  var markName = getFiberMarkName(label, debugID);
-  beginMark(markName);
-  return true;
-};
-
-var clearFiberMark = function (fiber, phase) {
-  var componentName = getComponentName(fiber) || 'Unknown';
-  var debugID = fiber._debugID;
-  var isMounted = fiber.alternate !== null;
-  var label = getFiberLabel(componentName, isMounted, phase);
-  var markName = getFiberMarkName(label, debugID);
-  clearMark(markName);
-};
-
-var endFiberMark = function (fiber, phase, warning) {
-  var componentName = getComponentName(fiber) || 'Unknown';
-  var debugID = fiber._debugID;
-  var isMounted = fiber.alternate !== null;
-  var label = getFiberLabel(componentName, isMounted, phase);
-  var markName = getFiberMarkName(label, debugID);
-  endMark(label, markName, warning);
-};
-
-var shouldIgnoreFiber = function (fiber) {
-  // Host components should be skipped in the timeline.
-  // We could check typeof fiber.type, but does this work with RN?
-  switch (fiber.tag) {
-    case HostRoot:
-    case HostComponent:
-    case HostText:
-    case HostPortal:
-    case Fragment:
-    case ContextProvider:
-    case ContextConsumer:
-    case Mode:
-      return true;
-    default:
-      return false;
-  }
-};
-
-var clearPendingPhaseMeasurement = function () {
-  if (currentPhase !== null && currentPhaseFiber !== null) {
-    clearFiberMark(currentPhaseFiber, currentPhase);
-  }
-  currentPhaseFiber = null;
-  currentPhase = null;
-  hasScheduledUpdateInCurrentPhase = false;
-};
-
-var pauseTimers = function () {
-  // Stops all currently active measurements so that they can be resumed
-  // if we continue in a later deferred loop from the same unit of work.
-  var fiber = currentFiber;
-  while (fiber) {
-    if (fiber._debugIsCurrentlyTiming) {
-      endFiberMark(fiber, null, null);
-    }
-    fiber = fiber.return;
-  }
-};
-
-var resumeTimersRecursively = function (fiber) {
-  if (fiber.return !== null) {
-    resumeTimersRecursively(fiber.return);
-  }
-  if (fiber._debugIsCurrentlyTiming) {
-    beginFiberMark(fiber, null);
-  }
-};
-
-var resumeTimers = function () {
-  // Resumes all measurements that were active during the last deferred loop.
-  if (currentFiber !== null) {
-    resumeTimersRecursively(currentFiber);
-  }
-};
-
-function recordEffect() {
-  if (enableUserTimingAPI) {
-    effectCountInCurrentCommit++;
-  }
-}
-
-function recordScheduleUpdate() {
-  if (enableUserTimingAPI) {
-    if (isCommitting) {
-      hasScheduledUpdateInCurrentCommit = true;
-    }
-    if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
-      hasScheduledUpdateInCurrentPhase = true;
-    }
-  }
-}
-
-function startRequestCallbackTimer() {
-  if (enableUserTimingAPI) {
-    if (supportsUserTiming && !isWaitingForCallback) {
-      isWaitingForCallback = true;
-      beginMark('(Waiting for async callback...)');
-    }
-  }
-}
-
-function stopRequestCallbackTimer(didExpire, expirationTime) {
-  if (enableUserTimingAPI) {
-    if (supportsUserTiming) {
-      isWaitingForCallback = false;
-      var warning = didExpire ? 'React was blocked by main thread' : null;
-      endMark('(Waiting for async callback... will force flush in ' + expirationTime + ' ms)', '(Waiting for async callback...)', warning);
-    }
-  }
-}
-
-function startWorkTimer(fiber) {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
-      return;
-    }
-    // If we pause, this is the fiber to unwind from.
-    currentFiber = fiber;
-    if (!beginFiberMark(fiber, null)) {
-      return;
-    }
-    fiber._debugIsCurrentlyTiming = true;
-  }
-}
-
-function cancelWorkTimer(fiber) {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
-      return;
-    }
-    // Remember we shouldn't complete measurement for this fiber.
-    // Otherwise flamechart will be deep even for small updates.
-    fiber._debugIsCurrentlyTiming = false;
-    clearFiberMark(fiber, null);
-  }
-}
-
-function stopWorkTimer(fiber) {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
-      return;
-    }
-    // If we pause, its parent is the fiber to unwind from.
-    currentFiber = fiber.return;
-    if (!fiber._debugIsCurrentlyTiming) {
-      return;
-    }
-    fiber._debugIsCurrentlyTiming = false;
-    endFiberMark(fiber, null, null);
-  }
-}
-
-function stopFailedWorkTimer(fiber) {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
-      return;
-    }
-    // If we pause, its parent is the fiber to unwind from.
-    currentFiber = fiber.return;
-    if (!fiber._debugIsCurrentlyTiming) {
-      return;
-    }
-    fiber._debugIsCurrentlyTiming = false;
-    var warning = 'An error was thrown inside this error boundary';
-    endFiberMark(fiber, null, warning);
-  }
-}
-
-function startPhaseTimer(fiber, phase) {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    clearPendingPhaseMeasurement();
-    if (!beginFiberMark(fiber, phase)) {
-      return;
-    }
-    currentPhaseFiber = fiber;
-    currentPhase = phase;
-  }
-}
-
-function stopPhaseTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    if (currentPhase !== null && currentPhaseFiber !== null) {
-      var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
-      endFiberMark(currentPhaseFiber, currentPhase, warning);
-    }
-    currentPhase = null;
-    currentPhaseFiber = null;
-  }
-}
-
-function startWorkLoopTimer(nextUnitOfWork) {
-  if (enableUserTimingAPI) {
-    currentFiber = nextUnitOfWork;
-    if (!supportsUserTiming) {
-      return;
-    }
-    commitCountInCurrentWorkLoop = 0;
-    // This is top level call.
-    // Any other measurements are performed within.
-    beginMark('(React Tree Reconciliation)');
-    // Resume any measurements that were in progress during the last loop.
-    resumeTimers();
-  }
-}
-
-function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    var warning = null;
-    if (interruptedBy !== null) {
-      if (interruptedBy.tag === HostRoot) {
-        warning = 'A top-level update interrupted the previous render';
-      } else {
-        var componentName = getComponentName(interruptedBy) || 'Unknown';
-        warning = 'An update to ' + componentName + ' interrupted the previous render';
-      }
-    } else if (commitCountInCurrentWorkLoop > 1) {
-      warning = 'There were cascading updates';
-    }
-    commitCountInCurrentWorkLoop = 0;
-    var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)';
-    // Pause any measurements until the next loop.
-    pauseTimers();
-    endMark(label, '(React Tree Reconciliation)', warning);
-  }
-}
-
-function startCommitTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    isCommitting = true;
-    hasScheduledUpdateInCurrentCommit = false;
-    labelsInCurrentCommit.clear();
-    beginMark('(Committing Changes)');
-  }
-}
-
-function stopCommitTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-
-    var warning = null;
-    if (hasScheduledUpdateInCurrentCommit) {
-      warning = 'Lifecycle hook scheduled a cascading update';
-    } else if (commitCountInCurrentWorkLoop > 0) {
-      warning = 'Caused by a cascading update in earlier commit';
-    }
-    hasScheduledUpdateInCurrentCommit = false;
-    commitCountInCurrentWorkLoop++;
-    isCommitting = false;
-    labelsInCurrentCommit.clear();
-
-    endMark('(Committing Changes)', '(Committing Changes)', warning);
-  }
-}
-
-function startCommitSnapshotEffectsTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    effectCountInCurrentCommit = 0;
-    beginMark('(Committing Snapshot Effects)');
-  }
-}
-
-function stopCommitSnapshotEffectsTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    var count = effectCountInCurrentCommit;
-    effectCountInCurrentCommit = 0;
-    endMark('(Committing Snapshot Effects: ' + count + ' Total)', '(Committing Snapshot Effects)', null);
-  }
-}
-
-function startCommitHostEffectsTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    effectCountInCurrentCommit = 0;
-    beginMark('(Committing Host Effects)');
-  }
-}
-
-function stopCommitHostEffectsTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    var count = effectCountInCurrentCommit;
-    effectCountInCurrentCommit = 0;
-    endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null);
-  }
-}
-
-function startCommitLifeCyclesTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    effectCountInCurrentCommit = 0;
-    beginMark('(Calling Lifecycle Methods)');
-  }
-}
-
-function stopCommitLifeCyclesTimer() {
-  if (enableUserTimingAPI) {
-    if (!supportsUserTiming) {
-      return;
-    }
-    var count = effectCountInCurrentCommit;
-    effectCountInCurrentCommit = 0;
-    endMark('(Calling Lifecycle Methods: ' + count + ' Total)', '(Calling Lifecycle Methods)', null);
-  }
-}
-
-var valueStack = [];
-
-var index = -1;
-
-function createCursor(defaultValue) {
-  return {
-    current: defaultValue
-  };
-}
-
-function pop(cursor, fiber) {
-  if (index < 0) {
-    return;
-  }
-
-  cursor.current = valueStack[index];
-
-  valueStack[index] = null;
-
-  index--;
-}
-
-function push(cursor, value, fiber) {
-  index++;
-
-  valueStack[index] = cursor.current;
-
-  cursor.current = value;
-}
-
-// A cursor to the current merged context object on the stack.
-var contextStackCursor = createCursor(emptyObject_1);
-// A cursor to a boolean indicating whether the context has changed.
-var didPerformWorkStackCursor = createCursor(false);
-// Keep track of the previous context object that was on the stack.
-// We use this to get access to the parent context after we have already
-// pushed the next context provider, and now need to merge their contexts.
-var previousContext = emptyObject_1;
-
-function getUnmaskedContext(workInProgress) {
-  var hasOwnContext = isContextProvider(workInProgress);
-  if (hasOwnContext) {
-    // If the fiber is a context provider itself, when we read its context
-    // we have already pushed its own child context on the stack. A context
-    // provider should not "see" its own child context. Therefore we read the
-    // previous (parent) context instead for a context provider.
-    return previousContext;
-  }
-  return contextStackCursor.current;
-}
-
-function cacheContext(workInProgress, unmaskedContext, maskedContext) {
-  var instance = workInProgress.stateNode;
-  instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
-  instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
-}
-
-function getMaskedContext(workInProgress, unmaskedContext) {
-  var type = workInProgress.type;
-  var contextTypes = type.contextTypes;
-  if (!contextTypes) {
-    return emptyObject_1;
-  }
-
-  // Avoid recreating masked context unless unmasked context has changed.
-  // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
-  // This may trigger infinite loops if componentWillReceiveProps calls setState.
-  var instance = workInProgress.stateNode;
-  if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
-    return instance.__reactInternalMemoizedMaskedChildContext;
-  }
-
-  var context = {};
-  for (var key in contextTypes) {
-    context[key] = unmaskedContext[key];
-  }
-
-  if (instance) {
-    cacheContext(workInProgress, unmaskedContext, context);
-  }
-
-  return context;
-}
-
-function hasContextChanged() {
-  return didPerformWorkStackCursor.current;
-}
-
-function isContextConsumer(fiber) {
-  return fiber.tag === ClassComponent && fiber.type.contextTypes != null;
-}
-
-function isContextProvider(fiber) {
-  return fiber.tag === ClassComponent && fiber.type.childContextTypes != null;
-}
-
-function popContextProvider(fiber) {
-  if (!isContextProvider(fiber)) {
-    return;
-  }
-
-  pop(didPerformWorkStackCursor, fiber);
-  pop(contextStackCursor, fiber);
-}
-
-function popTopLevelContextObject(fiber) {
-  pop(didPerformWorkStackCursor, fiber);
-  pop(contextStackCursor, fiber);
-}
-
-function pushTopLevelContextObject(fiber, context, didChange) {
-  !(contextStackCursor.current === emptyObject_1) ? reactProdInvariant('168') : void 0;
-
-  push(contextStackCursor, context, fiber);
-  push(didPerformWorkStackCursor, didChange, fiber);
-}
-
-function processChildContext(fiber, parentContext) {
-  var instance = fiber.stateNode;
-  var childContextTypes = fiber.type.childContextTypes;
-
-  // TODO (bvaughn) Replace this behavior with an invariant() in the future.
-  // It has only been added in Fiber to match the (unintentional) behavior in Stack.
-  if (typeof instance.getChildContext !== 'function') {
-    return parentContext;
-  }
-
-  var childContext = void 0;
-  startPhaseTimer(fiber, 'getChildContext');
-  childContext = instance.getChildContext();
-  stopPhaseTimer();
-  for (var contextKey in childContext) {
-    !(contextKey in childContextTypes) ? reactProdInvariant('108', getComponentName(fiber) || 'Unknown', contextKey) : void 0;
-  }
-  return _assign({}, parentContext, childContext);
-}
-
-function pushContextProvider(workInProgress) {
-  if (!isContextProvider(workInProgress)) {
-    return false;
-  }
-
-  var instance = workInProgress.stateNode;
-  // We push the context as early as possible to ensure stack integrity.
-  // If the instance does not exist yet, we will push null at first,
-  // and replace it on the stack later when invalidating the context.
-  var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyObject_1;
-
-  // Remember the parent context so we can merge with it later.
-  // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
-  previousContext = contextStackCursor.current;
-  push(contextStackCursor, memoizedMergedChildContext, workInProgress);
-  push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
-
-  return true;
-}
-
-function invalidateContextProvider(workInProgress, didChange) {
-  var instance = workInProgress.stateNode;
-  !instance ? reactProdInvariant('169') : void 0;
-
-  if (didChange) {
-    // Merge parent and own context.
-    // Skip this if we're not updating due to sCU.
-    // This avoids unnecessarily recomputing memoized values.
-    var mergedContext = processChildContext(workInProgress, previousContext);
-    instance.__reactInternalMemoizedMergedChildContext = mergedContext;
-
-    // Replace the old (or empty) context with the new one.
-    // It is important to unwind the context in the reverse order.
-    pop(didPerformWorkStackCursor, workInProgress);
-    pop(contextStackCursor, workInProgress);
-    // Now push the new context and mark that it has changed.
-    push(contextStackCursor, mergedContext, workInProgress);
-    push(didPerformWorkStackCursor, didChange, workInProgress);
-  } else {
-    pop(didPerformWorkStackCursor, workInProgress);
-    push(didPerformWorkStackCursor, didChange, workInProgress);
-  }
-}
-
-function findCurrentUnmaskedContext(fiber) {
-  // Currently this is only used with renderSubtreeIntoContainer; not sure if it
-  // makes sense elsewhere
-  !(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? reactProdInvariant('170') : void 0;
-
-  var node = fiber;
-  while (node.tag !== HostRoot) {
-    if (isContextProvider(node)) {
-      return node.stateNode.__reactInternalMemoizedMergedChildContext;
-    }
-    var parent = node.return;
-    !parent ? reactProdInvariant('171') : void 0;
-    node = parent;
-  }
-  return node.stateNode.context;
-}
-
-// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
-// Math.pow(2, 30) - 1
-// 0b111111111111111111111111111111
-var MAX_SIGNED_31_BIT_INT = 1073741823;
-
-// TODO: Use an opaque type once ESLint et al support the syntax
-
-
-var NoWork = 0;
-var Sync = 1;
-var Never = MAX_SIGNED_31_BIT_INT;
-
-var UNIT_SIZE = 10;
-var MAGIC_NUMBER_OFFSET = 2;
-
-// 1 unit of expiration time represents 10ms.
-function msToExpirationTime(ms) {
-  // Always add an offset so that we don't clash with the magic number for NoWork.
-  return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;
-}
-
-function expirationTimeToMs(expirationTime) {
-  return (expirationTime - MAGIC_NUMBER_OFFSET) * UNIT_SIZE;
-}
-
-function ceiling(num, precision) {
-  return ((num / precision | 0) + 1) * precision;
-}
-
-function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
-  return MAGIC_NUMBER_OFFSET + ceiling(currentTime - MAGIC_NUMBER_OFFSET + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
-}
-
-var NoContext = 0;
-var AsyncMode = 1;
-var StrictMode = 2;
-var ProfileMode = 4;
-
-function FiberNode(tag, pendingProps, key, mode) {
-  // Instance
-  this.tag = tag;
-  this.key = key;
-  this.type = null;
-  this.stateNode = null;
-
-  // Fiber
-  this.return = null;
-  this.child = null;
-  this.sibling = null;
-  this.index = 0;
-
-  this.ref = null;
-
-  this.pendingProps = pendingProps;
-  this.memoizedProps = null;
-  this.updateQueue = null;
-  this.memoizedState = null;
-
-  this.mode = mode;
-
-  // Effects
-  this.effectTag = NoEffect;
-  this.nextEffect = null;
-
-  this.firstEffect = null;
-  this.lastEffect = null;
-
-  this.expirationTime = NoWork;
-
-  this.alternate = null;
-
-  if (enableProfilerTimer) {
-    this.actualDuration = 0;
-    this.actualStartTime = 0;
-    this.selfBaseTime = 0;
-    this.treeBaseTime = 0;
-  }
-
-  
-}
-
-// This is a constructor function, rather than a POJO constructor, still
-// please ensure we do the following:
-// 1) Nobody should add any instance methods on this. Instance methods can be
-//    more difficult to predict when they get optimized and they are almost
-//    never inlined properly in static compilers.
-// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
-//    always know when it is a fiber.
-// 3) We might want to experiment with using numeric keys since they are easier
-//    to optimize in a non-JIT environment.
-// 4) We can easily go from a constructor to a createFiber object literal if that
-//    is faster.
-// 5) It should be easy to port this to a C struct and keep a C implementation
-//    compatible.
-var createFiber = function (tag, pendingProps, key, mode) {
-  // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
-  return new FiberNode(tag, pendingProps, key, mode);
-};
-
-function shouldConstruct(Component) {
-  return !!(Component.prototype && Component.prototype.isReactComponent);
-}
-
-// This is used to create an alternate fiber to do work on.
-function createWorkInProgress(current, pendingProps, expirationTime) {
-  var workInProgress = current.alternate;
-  if (workInProgress === null) {
-    // We use a double buffering pooling technique because we know that we'll
-    // only ever need at most two versions of a tree. We pool the "other" unused
-    // node that we're free to reuse. This is lazily created to avoid allocating
-    // extra objects for things that are never updated. It also allow us to
-    // reclaim the extra memory if needed.
-    workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
-    workInProgress.type = current.type;
-    workInProgress.stateNode = current.stateNode;
-
-    workInProgress.alternate = current;
-    current.alternate = workInProgress;
-  } else {
-    workInProgress.pendingProps = pendingProps;
-
-    // We already have an alternate.
-    // Reset the effect tag.
-    workInProgress.effectTag = NoEffect;
-
-    // The effect list is no longer valid.
-    workInProgress.nextEffect = null;
-    workInProgress.firstEffect = null;
-    workInProgress.lastEffect = null;
-
-    if (enableProfilerTimer) {
-      // We intentionally reset, rather than copy, actualDuration & actualStartTime.
-      // This prevents time from endlessly accumulating in new commits.
-      // This has the downside of resetting values for different priority renders,
-      // But works for yielding (the common case) and should support resuming.
-      workInProgress.actualDuration = 0;
-      workInProgress.actualStartTime = 0;
-    }
-  }
-
-  workInProgress.expirationTime = expirationTime;
-
-  workInProgress.child = current.child;
-  workInProgress.memoizedProps = current.memoizedProps;
-  workInProgress.memoizedState = current.memoizedState;
-  workInProgress.updateQueue = current.updateQueue;
-
-  // These will be overridden during the parent's reconciliation
-  workInProgress.sibling = current.sibling;
-  workInProgress.index = current.index;
-  workInProgress.ref = current.ref;
-
-  if (enableProfilerTimer) {
-    workInProgress.selfBaseTime = current.selfBaseTime;
-    workInProgress.treeBaseTime = current.treeBaseTime;
-  }
-
-  return workInProgress;
-}
-
-function createHostRootFiber(isAsync) {
-  var mode = isAsync ? AsyncMode | StrictMode : NoContext;
-  return createFiber(HostRoot, null, null, mode);
-}
-
-function createFiberFromElement(element, mode, expirationTime) {
-  var owner = null;
-  var fiber = void 0;
-  var type = element.type;
-  var key = element.key;
-  var pendingProps = element.props;
-
-  var fiberTag = void 0;
-  if (typeof type === 'function') {
-    fiberTag = shouldConstruct(type) ? ClassComponent : IndeterminateComponent;
-  } else if (typeof type === 'string') {
-    fiberTag = HostComponent;
-  } else {
-    switch (type) {
-      case REACT_FRAGMENT_TYPE:
-        return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
-      case REACT_ASYNC_MODE_TYPE:
-        fiberTag = Mode;
-        mode |= AsyncMode | StrictMode;
-        break;
-      case REACT_STRICT_MODE_TYPE:
-        fiberTag = Mode;
-        mode |= StrictMode;
-        break;
-      case REACT_PROFILER_TYPE:
-        return createFiberFromProfiler(pendingProps, mode, expirationTime, key);
-      case REACT_TIMEOUT_TYPE:
-        fiberTag = TimeoutComponent;
-        // Suspense does not require async, but its children should be strict
-        // mode compatible.
-        mode |= StrictMode;
-        break;
-      default:
-        fiberTag = getFiberTagFromObjectType(type, owner);
-        break;
-    }
-  }
-
-  fiber = createFiber(fiberTag, pendingProps, key, mode);
-  fiber.type = type;
-  fiber.expirationTime = expirationTime;
-
-  return fiber;
-}
-
-function getFiberTagFromObjectType(type, owner) {
-  var $$typeof = typeof type === 'object' && type !== null ? type.$$typeof : null;
-
-  switch ($$typeof) {
-    case REACT_PROVIDER_TYPE:
-      return ContextProvider;
-    case REACT_CONTEXT_TYPE:
-      // This is a consumer
-      return ContextConsumer;
-    case REACT_FORWARD_REF_TYPE:
-      return ForwardRef;
-    default:
-      {
-        var info = '';
-        reactProdInvariant('130', type == null ? type : typeof type, info);
-      }
-  }
-}
-
-function createFiberFromFragment(elements, mode, expirationTime, key) {
-  var fiber = createFiber(Fragment, elements, key, mode);
-  fiber.expirationTime = expirationTime;
-  return fiber;
-}
-
-function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
-  var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);
-  fiber.type = REACT_PROFILER_TYPE;
-  fiber.expirationTime = expirationTime;
-
-  return fiber;
-}
-
-function createFiberFromText(content, mode, expirationTime) {
-  var fiber = createFiber(HostText, content, null, mode);
-  fiber.expirationTime = expirationTime;
-  return fiber;
-}
-
-function createFiberFromHostInstanceForDeletion() {
-  var fiber = createFiber(HostComponent, null, null, NoContext);
-  fiber.type = 'DELETED';
-  return fiber;
-}
-
-function createFiberFromPortal(portal, mode, expirationTime) {
-  var pendingProps = portal.children !== null ? portal.children : [];
-  var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
-  fiber.expirationTime = expirationTime;
-  fiber.stateNode = {
-    containerInfo: portal.containerInfo,
-    pendingChildren: null, // Used by persistent updates
-    implementation: portal.implementation
-  };
-  return fiber;
-}
-
-// Used for stashing WIP properties to replay failed work in DEV.
-
-// TODO: This should be lifted into the renderer.
-
-
-function createFiberRoot(containerInfo, isAsync, hydrate) {
-  // Cyclic construction. This cheats the type system right now because
-  // stateNode is any.
-  var uninitializedFiber = createHostRootFiber(isAsync);
-  var root = {
-    current: uninitializedFiber,
-    containerInfo: containerInfo,
-    pendingChildren: null,
-
-    earliestPendingTime: NoWork,
-    latestPendingTime: NoWork,
-    earliestSuspendedTime: NoWork,
-    latestSuspendedTime: NoWork,
-    latestPingedTime: NoWork,
-
-    pendingCommitExpirationTime: NoWork,
-    finishedWork: null,
-    context: null,
-    pendingContext: null,
-    hydrate: hydrate,
-    remainingExpirationTime: NoWork,
-    firstBatch: null,
-    nextScheduledRoot: null
-  };
-  uninitializedFiber.stateNode = root;
-  return root;
-}
-
-var onCommitFiberRoot = null;
-var onCommitFiberUnmount = null;
-
-
-function onCommitRoot(root) {
-  if (typeof onCommitFiberRoot === 'function') {
-    onCommitFiberRoot(root);
-  }
-}
-
-function onCommitUnmount(fiber) {
-  if (typeof onCommitFiberUnmount === 'function') {
-    onCommitFiberUnmount(fiber);
-  }
-}
-
-/**
- * Forked from fbjs/warning:
- * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
- *
- * Only change is we use console.warn instead of console.error,
- * and do nothing when 'console' is not supported.
- * This really simplifies the code.
- * ---
- * Similar to invariant but only logs a warning if the condition is not met.
- * This can be used to log issues in development environments in critical
- * paths. Removing the logging code for production environments will keep the
- * same logic and follow the same code paths.
- */
-
-// This lets us hook into Fiber to debug what it's doing.
-// See https://github.com/facebook/react/pull/8033.
-// This is not part of the public API, not even for React DevTools.
-// You may only inject a debugTool if you work on React Fiber itself.
-
-// TODO: Offscreen updates
-
-function markPendingPriorityLevel(root, expirationTime) {
-  if (enableSuspense) {
-    // Update the latest and earliest pending times
-    var earliestPendingTime = root.earliestPendingTime;
-    if (earliestPendingTime === NoWork) {
-      // No other pending updates.
-      root.earliestPendingTime = root.latestPendingTime = expirationTime;
-    } else {
-      if (earliestPendingTime > expirationTime) {
-        // This is the earliest pending update.
-        root.earliestPendingTime = expirationTime;
-      } else {
-        var latestPendingTime = root.latestPendingTime;
-        if (latestPendingTime < expirationTime) {
-          // This is the latest pending update
-          root.latestPendingTime = expirationTime;
-        }
-      }
-    }
-  }
-}
-
-function markCommittedPriorityLevels(root, currentTime, earliestRemainingTime) {
-  if (enableSuspense) {
-    if (earliestRemainingTime === NoWork) {
-      // Fast path. There's no remaining work. Clear everything.
-      root.earliestPendingTime = NoWork;
-      root.latestPendingTime = NoWork;
-      root.earliestSuspendedTime = NoWork;
-      root.latestSuspendedTime = NoWork;
-      root.latestPingedTime = NoWork;
-      return;
-    }
-
-    // Let's see if the previous latest known pending level was just flushed.
-    var latestPendingTime = root.latestPendingTime;
-    if (latestPendingTime !== NoWork) {
-      if (latestPendingTime < earliestRemainingTime) {
-        // We've flushed all the known pending levels.
-        root.earliestPendingTime = root.latestPendingTime = NoWork;
-      } else {
-        var earliestPendingTime = root.earliestPendingTime;
-        if (earliestPendingTime < earliestRemainingTime) {
-          // We've flushed the earliest known pending level. Set this to the
-          // latest pending time.
-          root.earliestPendingTime = root.latestPendingTime;
-        }
-      }
-    }
-
-    // Now let's handle the earliest remaining level in the whole tree. We need to
-    // decide whether to treat it as a pending level or as suspended. Check
-    // it falls within the range of known suspended levels.
-
-    var earliestSuspendedTime = root.earliestSuspendedTime;
-    if (earliestSuspendedTime === NoWork) {
-      // There's no suspended work. Treat the earliest remaining level as a
-      // pending level.
-      markPendingPriorityLevel(root, earliestRemainingTime);
-      return;
-    }
-
-    var latestSuspendedTime = root.latestSuspendedTime;
-    if (earliestRemainingTime > latestSuspendedTime) {
-      // The earliest remaining level is later than all the suspended work. That
-      // means we've flushed all the suspended work.
-      root.earliestSuspendedTime = NoWork;
-      root.latestSuspendedTime = NoWork;
-      root.latestPingedTime = NoWork;
-
-      // There's no suspended work. Treat the earliest remaining level as a
-      // pending level.
-      markPendingPriorityLevel(root, earliestRemainingTime);
-      return;
-    }
-
-    if (earliestRemainingTime < earliestSuspendedTime) {
-      // The earliest remaining time is earlier than all the suspended work.
-      // Treat it as a pending update.
-      markPendingPriorityLevel(root, earliestRemainingTime);
-      return;
-    }
-
-    // The earliest remaining time falls within the range of known suspended
-    // levels. We should treat this as suspended work.
-  }
-}
-
-function markSuspendedPriorityLevel(root, suspendedTime) {
-  if (enableSuspense) {
-    // First, check the known pending levels and update them if needed.
-    var earliestPendingTime = root.earliestPendingTime;
-    var latestPendingTime = root.latestPendingTime;
-    if (earliestPendingTime === suspendedTime) {
-      if (latestPendingTime === suspendedTime) {
-        // Both known pending levels were suspended. Clear them.
-        root.earliestPendingTime = root.latestPendingTime = NoWork;
-      } else {
-        // The earliest pending level was suspended. Clear by setting it to the
-        // latest pending level.
-        root.earliestPendingTime = latestPendingTime;
-      }
-    } else if (latestPendingTime === suspendedTime) {
-      // The latest pending level was suspended. Clear by setting it to the
-      // latest pending level.
-      root.latestPendingTime = earliestPendingTime;
-    }
-
-    // Next, if we're working on the lowest known suspended level, clear the ping.
-    // TODO: What if a promise suspends and pings before the root completes?
-    var latestSuspendedTime = root.latestSuspendedTime;
-    if (latestSuspendedTime === suspendedTime) {
-      root.latestPingedTime = NoWork;
-    }
-
-    // Finally, update the known suspended levels.
-    var earliestSuspendedTime = root.earliestSuspendedTime;
-    if (earliestSuspendedTime === NoWork) {
-      // No other suspended levels.
-      root.earliestSuspendedTime = root.latestSuspendedTime = suspendedTime;
-    } else {
-      if (earliestSuspendedTime > suspendedTime) {
-        // This is the earliest suspended level.
-        root.earliestSuspendedTime = suspendedTime;
-      } else if (latestSuspendedTime < suspendedTime) {
-        // This is the latest suspended level
-        root.latestSuspendedTime = suspendedTime;
-      }
-    }
-  }
-}
-
-function markPingedPriorityLevel(root, pingedTime) {
-  if (enableSuspense) {
-    var latestSuspendedTime = root.latestSuspendedTime;
-    if (latestSuspendedTime !== NoWork && latestSuspendedTime <= pingedTime) {
-      var latestPingedTime = root.latestPingedTime;
-      if (latestPingedTime === NoWork || latestPingedTime < pingedTime) {
-        root.latestPingedTime = pingedTime;
-      }
-    }
-  }
-}
-
-function findNextPendingPriorityLevel(root) {
-  if (enableSuspense) {
-    var earliestSuspendedTime = root.earliestSuspendedTime;
-    var earliestPendingTime = root.earliestPendingTime;
-    if (earliestSuspendedTime === NoWork) {
-      // Fast path. There's no suspended work.
-      return earliestPendingTime;
-    }
-
-    // First, check if there's known pending work.
-    if (earliestPendingTime !== NoWork) {
-      return earliestPendingTime;
-    }
-
-    // Finally, if a suspended level was pinged, work on that. Otherwise there's
-    // nothing to work on.
-    return root.latestPingedTime;
-  } else {
-    return root.current.expirationTime;
-  }
-}
-
-// UpdateQueue is a linked list of prioritized updates.
-//
-// Like fibers, update queues come in pairs: a current queue, which represents
-// the visible state of the screen, and a work-in-progress queue, which is
-// can be mutated and processed asynchronously before it is committed — a form
-// of double buffering. If a work-in-progress render is discarded before
-// finishing, we create a new work-in-progress by cloning the current queue.
-//
-// Both queues share a persistent, singly-linked list structure. To schedule an
-// update, we append it to the end of both queues. Each queue maintains a
-// pointer to first update in the persistent list that hasn't been processed.
-// The work-in-progress pointer always has a position equal to or greater than
-// the current queue, since we always work on that one. The current queue's
-// pointer is only updated during the commit phase, when we swap in the
-// work-in-progress.
-//
-// For example:
-//
-//   Current pointer:           A - B - C - D - E - F
-//   Work-in-progress pointer:              D - E - F
-//                                          ^
-//                                          The work-in-progress queue has
-//                                          processed more updates than current.
-//
-// The reason we append to both queues is because otherwise we might drop
-// updates without ever processing them. For example, if we only add updates to
-// the work-in-progress queue, some updates could be lost whenever a work-in
-// -progress render restarts by cloning from current. Similarly, if we only add
-// updates to the current queue, the updates will be lost whenever an already
-// in-progress queue commits and swaps with the current queue. However, by
-// adding to both queues, we guarantee that the update will be part of the next
-// work-in-progress. (And because the work-in-progress queue becomes the
-// current queue once it commits, there's no danger of applying the same
-// update twice.)
-//
-// Prioritization
-// --------------
-//
-// Updates are not sorted by priority, but by insertion; new updates are always
-// appended to the end of the list.
-//
-// The priority is still important, though. When processing the update queue
-// during the render phase, only the updates with sufficient priority are
-// included in the result. If we skip an update because it has insufficient
-// priority, it remains in the queue to be processed later, during a lower
-// priority render. Crucially, all updates subsequent to a skipped update also
-// remain in the queue *regardless of their priority*. That means high priority
-// updates are sometimes processed twice, at two separate priorities. We also
-// keep track of a base state, that represents the state before the first
-// update in the queue is applied.
-//
-// For example:
-//
-//   Given a base state of '', and the following queue of updates
-//
-//     A1 - B2 - C1 - D2
-//
-//   where the number indicates the priority, and the update is applied to the
-//   previous state by appending a letter, React will process these updates as
-//   two separate renders, one per distinct priority level:
-//
-//   First render, at priority 1:
-//     Base state: ''
-//     Updates: [A1, C1]
-//     Result state: 'AC'
-//
-//   Second render, at priority 2:
-//     Base state: 'A'            <-  The base state does not include C1,
-//                                    because B2 was skipped.
-//     Updates: [B2, C1, D2]      <-  C1 was rebased on top of B2
-//     Result state: 'ABCD'
-//
-// Because we process updates in insertion order, and rebase high priority
-// updates when preceding updates are skipped, the final result is deterministic
-// regardless of priority. Intermediate state may vary according to system
-// resources, but the final state is always the same.
-
-var UpdateState = 0;
-var ReplaceState = 1;
-var ForceUpdate = 2;
-var CaptureUpdate = 3;
-
-// Global state that is reset at the beginning of calling `processUpdateQueue`.
-// It should only be read right after calling `processUpdateQueue`, via
-// `checkHasForceUpdateAfterProcessing`.
-var hasForceUpdate = false;
-
-
-function createUpdateQueue(baseState) {
-  var queue = {
-    expirationTime: NoWork,
-    baseState: baseState,
-    firstUpdate: null,
-    lastUpdate: null,
-    firstCapturedUpdate: null,
-    lastCapturedUpdate: null,
-    firstEffect: null,
-    lastEffect: null,
-    firstCapturedEffect: null,
-    lastCapturedEffect: null
-  };
-  return queue;
-}
-
-function cloneUpdateQueue(currentQueue) {
-  var queue = {
-    expirationTime: currentQueue.expirationTime,
-    baseState: currentQueue.baseState,
-    firstUpdate: currentQueue.firstUpdate,
-    lastUpdate: currentQueue.lastUpdate,
-
-    // TODO: With resuming, if we bail out and resuse the child tree, we should
-    // keep these effects.
-    firstCapturedUpdate: null,
-    lastCapturedUpdate: null,
-
-    firstEffect: null,
-    lastEffect: null,
-
-    firstCapturedEffect: null,
-    lastCapturedEffect: null
-  };
-  return queue;
-}
-
-function createUpdate(expirationTime) {
-  return {
-    expirationTime: expirationTime,
-
-    tag: UpdateState,
-    payload: null,
-    callback: null,
-
-    next: null,
-    nextEffect: null
-  };
-}
-
-function appendUpdateToQueue(queue, update, expirationTime) {
-  // Append the update to the end of the list.
-  if (queue.lastUpdate === null) {
-    // Queue is empty
-    queue.firstUpdate = queue.lastUpdate = update;
-  } else {
-    queue.lastUpdate.next = update;
-    queue.lastUpdate = update;
-  }
-  if (queue.expirationTime === NoWork || queue.expirationTime > expirationTime) {
-    // The incoming update has the earliest expiration of any update in the
-    // queue. Update the queue's expiration time.
-    queue.expirationTime = expirationTime;
-  }
-}
-
-function enqueueUpdate(fiber, update, expirationTime) {
-  // Update queues are created lazily.
-  var alternate = fiber.alternate;
-  var queue1 = void 0;
-  var queue2 = void 0;
-  if (alternate === null) {
-    // There's only one fiber.
-    queue1 = fiber.updateQueue;
-    queue2 = null;
-    if (queue1 === null) {
-      queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState);
-    }
-  } else {
-    // There are two owners.
-    queue1 = fiber.updateQueue;
-    queue2 = alternate.updateQueue;
-    if (queue1 === null) {
-      if (queue2 === null) {
-        // Neither fiber has an update queue. Create new ones.
-        queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState);
-        queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState);
-      } else {
-        // Only one fiber has an update queue. Clone to create a new one.
-        queue1 = fiber.updateQueue = cloneUpdateQueue(queue2);
-      }
-    } else {
-      if (queue2 === null) {
-        // Only one fiber has an update queue. Clone to create a new one.
-        queue2 = alternate.updateQueue = cloneUpdateQueue(queue1);
-      } else {
-        // Both owners have an update queue.
-      }
-    }
-  }
-  if (queue2 === null || queue1 === queue2) {
-    // There's only a single queue.
-    appendUpdateToQueue(queue1, update, expirationTime);
-  } else {
-    // There are two queues. We need to append the update to both queues,
-    // while accounting for the persistent structure of the list — we don't
-    // want the same update to be added multiple times.
-    if (queue1.lastUpdate === null || queue2.lastUpdate === null) {
-      // One of the queues is not empty. We must add the update to both queues.
-      appendUpdateToQueue(queue1, update, expirationTime);
-      appendUpdateToQueue(queue2, update, expirationTime);
-    } else {
-      // Both queues are non-empty. The last update is the same in both lists,
-      // because of structural sharing. So, only append to one of the lists.
-      appendUpdateToQueue(queue1, update, expirationTime);
-      // But we still need to update the `lastUpdate` pointer of queue2.
-      queue2.lastUpdate = update;
-    }
-  }
-
-  
-}
-
-function enqueueCapturedUpdate(workInProgress, update, renderExpirationTime) {
-  // Captured updates go into a separate list, and only on the work-in-
-  // progress queue.
-  var workInProgressQueue = workInProgress.updateQueue;
-  if (workInProgressQueue === null) {
-    workInProgressQueue = workInProgress.updateQueue = createUpdateQueue(workInProgress.memoizedState);
-  } else {
-    // TODO: I put this here rather than createWorkInProgress so that we don't
-    // clone the queue unnecessarily. There's probably a better way to
-    // structure this.
-    workInProgressQueue = ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue);
-  }
-
-  // Append the update to the end of the list.
-  if (workInProgressQueue.lastCapturedUpdate === null) {
-    // This is the first render phase update
-    workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update;
-  } else {
-    workInProgressQueue.lastCapturedUpdate.next = update;
-    workInProgressQueue.lastCapturedUpdate = update;
-  }
-  if (workInProgressQueue.expirationTime === NoWork || workInProgressQueue.expirationTime > renderExpirationTime) {
-    // The incoming update has the earliest expiration of any update in the
-    // queue. Update the queue's expiration time.
-    workInProgressQueue.expirationTime = renderExpirationTime;
-  }
-}
-
-function ensureWorkInProgressQueueIsAClone(workInProgress, queue) {
-  var current = workInProgress.alternate;
-  if (current !== null) {
-    // If the work-in-progress queue is equal to the current queue,
-    // we need to clone it first.
-    if (queue === current.updateQueue) {
-      queue = workInProgress.updateQueue = cloneUpdateQueue(queue);
-    }
-  }
-  return queue;
-}
-
-function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
-  switch (update.tag) {
-    case ReplaceState:
-      {
-        var _payload = update.payload;
-        if (typeof _payload === 'function') {
-          // Updater function
-          return _payload.call(instance, prevState, nextProps);
-        }
-        // State object
-        return _payload;
-      }
-    case CaptureUpdate:
-      {
-        workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
-      }
-    // Intentional fallthrough
-    case UpdateState:
-      {
-        var _payload2 = update.payload;
-        var partialState = void 0;
-        if (typeof _payload2 === 'function') {
-          // Updater function
-          partialState = _payload2.call(instance, prevState, nextProps);
-        } else {
-          // Partial state object
-          partialState = _payload2;
-        }
-        if (partialState === null || partialState === undefined) {
-          // Null and undefined are treated as no-ops.
-          return prevState;
-        }
-        // Merge the partial state and the previous state.
-        return _assign({}, prevState, partialState);
-      }
-    case ForceUpdate:
-      {
-        hasForceUpdate = true;
-        return prevState;
-      }
-  }
-  return prevState;
-}
-
-function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) {
-  hasForceUpdate = false;
-
-  if (queue.expirationTime === NoWork || queue.expirationTime > renderExpirationTime) {
-    // Insufficient priority. Bailout.
-    return;
-  }
-
-  queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue);
-
-  var newBaseState = queue.baseState;
-  var newFirstUpdate = null;
-  var newExpirationTime = NoWork;
-
-  // Iterate through the list of updates to compute the result.
-  var update = queue.firstUpdate;
-  var resultState = newBaseState;
-  while (update !== null) {
-    var updateExpirationTime = update.expirationTime;
-    if (updateExpirationTime > renderExpirationTime) {
-      // This update does not have sufficient priority. Skip it.
-      if (newFirstUpdate === null) {
-        // This is the first skipped update. It will be the first update in
-        // the new list.
-        newFirstUpdate = update;
-        // Since this is the first update that was skipped, the current result
-        // is the new base state.
-        newBaseState = resultState;
-      }
-      // Since this update will remain in the list, update the remaining
-      // expiration time.
-      if (newExpirationTime === NoWork || newExpirationTime > updateExpirationTime) {
-        newExpirationTime = updateExpirationTime;
-      }
-    } else {
-      // This update does have sufficient priority. Process it and compute
-      // a new result.
-      resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance);
-      var _callback = update.callback;
-      if (_callback !== null) {
-        workInProgress.effectTag |= Callback;
-        // Set this to null, in case it was mutated during an aborted render.
-        update.nextEffect = null;
-        if (queue.lastEffect === null) {
-          queue.firstEffect = queue.lastEffect = update;
-        } else {
-          queue.lastEffect.nextEffect = update;
-          queue.lastEffect = update;
-        }
-      }
-    }
-    // Continue to the next update.
-    update = update.next;
-  }
-
-  // Separately, iterate though the list of captured updates.
-  var newFirstCapturedUpdate = null;
-  update = queue.firstCapturedUpdate;
-  while (update !== null) {
-    var _updateExpirationTime = update.expirationTime;
-    if (_updateExpirationTime > renderExpirationTime) {
-      // This update does not have sufficient priority. Skip it.
-      if (newFirstCapturedUpdate === null) {
-        // This is the first skipped captured update. It will be the first
-        // update in the new list.
-        newFirstCapturedUpdate = update;
-        // If this is the first update that was skipped, the current result is
-        // the new base state.
-        if (newFirstUpdate === null) {
-          newBaseState = resultState;
-        }
-      }
-      // Since this update will remain in the list, update the remaining
-      // expiration time.
-      if (newExpirationTime === NoWork || newExpirationTime > _updateExpirationTime) {
-        newExpirationTime = _updateExpirationTime;
-      }
-    } else {
-      // This update does have sufficient priority. Process it and compute
-      // a new result.
-      resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance);
-      var _callback2 = update.callback;
-      if (_callback2 !== null) {
-        workInProgress.effectTag |= Callback;
-        // Set this to null, in case it was mutated during an aborted render.
-        update.nextEffect = null;
-        if (queue.lastCapturedEffect === null) {
-          queue.firstCapturedEffect = queue.lastCapturedEffect = update;
-        } else {
-          queue.lastCapturedEffect.nextEffect = update;
-          queue.lastCapturedEffect = update;
-        }
-      }
-    }
-    update = update.next;
-  }
-
-  if (newFirstUpdate === null) {
-    queue.lastUpdate = null;
-  }
-  if (newFirstCapturedUpdate === null) {
-    queue.lastCapturedUpdate = null;
-  } else {
-    workInProgress.effectTag |= Callback;
-  }
-  if (newFirstUpdate === null && newFirstCapturedUpdate === null) {
-    // We processed every update, without skipping. That means the new base
-    // state is the same as the result state.
-    newBaseState = resultState;
-  }
-
-  queue.baseState = newBaseState;
-  queue.firstUpdate = newFirstUpdate;
-  queue.firstCapturedUpdate = newFirstCapturedUpdate;
-  queue.expirationTime = newExpirationTime;
-
-  workInProgress.memoizedState = resultState;
-
-  
-}
-
-function callCallback(callback, context) {
-  !(typeof callback === 'function') ? reactProdInvariant('191', callback) : void 0;
-  callback.call(context);
-}
-
-function resetHasForceUpdateBeforeProcessing() {
-  hasForceUpdate = false;
-}
-
-function checkHasForceUpdateAfterProcessing() {
-  return hasForceUpdate;
-}
-
-function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) {
-  // If the finished render included captured updates, and there are still
-  // lower priority updates left over, we need to keep the captured updates
-  // in the queue so that they are rebased and not dropped once we process the
-  // queue again at the lower priority.
-  if (finishedQueue.firstCapturedUpdate !== null) {
-    // Join the captured update list to the end of the normal list.
-    if (finishedQueue.lastUpdate !== null) {
-      finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate;
-      finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate;
-    }
-    // Clear the list of captured updates.
-    finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null;
-  }
-
-  // Commit the effects
-  var effect = finishedQueue.firstEffect;
-  finishedQueue.firstEffect = finishedQueue.lastEffect = null;
-  while (effect !== null) {
-    var _callback3 = effect.callback;
-    if (_callback3 !== null) {
-      effect.callback = null;
-      callCallback(_callback3, instance);
-    }
-    effect = effect.nextEffect;
-  }
-
-  effect = finishedQueue.firstCapturedEffect;
-  finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
-  while (effect !== null) {
-    var _callback4 = effect.callback;
-    if (_callback4 !== null) {
-      effect.callback = null;
-      callCallback(_callback4, instance);
-    }
-    effect = effect.nextEffect;
-  }
-}
-
-function createCapturedValue(value, source) {
-  // If the value is an error, call this function immediately after it is thrown
-  // so the stack is accurate.
-  return {
-    value: value,
-    source: source,
-    stack: getStackAddendumByWorkInProgressFiber(source)
-  };
-}
-
-var providerCursor = createCursor(null);
-var valueCursor = createCursor(null);
-var changedBitsCursor = createCursor(0);
-
-function pushProvider(providerFiber) {
-  var context = providerFiber.type._context;
-
-  if (isPrimaryRenderer) {
-    push(changedBitsCursor, context._changedBits, providerFiber);
-    push(valueCursor, context._currentValue, providerFiber);
-    push(providerCursor, providerFiber, providerFiber);
-
-    context._currentValue = providerFiber.pendingProps.value;
-    context._changedBits = providerFiber.stateNode;
-    
-  } else {
-    push(changedBitsCursor, context._changedBits2, providerFiber);
-    push(valueCursor, context._currentValue2, providerFiber);
-    push(providerCursor, providerFiber, providerFiber);
-
-    context._currentValue2 = providerFiber.pendingProps.value;
-    context._changedBits2 = providerFiber.stateNode;
-    
-  }
-}
-
-function popProvider(providerFiber) {
-  var changedBits = changedBitsCursor.current;
-  var currentValue = valueCursor.current;
-
-  pop(providerCursor, providerFiber);
-  pop(valueCursor, providerFiber);
-  pop(changedBitsCursor, providerFiber);
-
-  var context = providerFiber.type._context;
-  if (isPrimaryRenderer) {
-    context._currentValue = currentValue;
-    context._changedBits = changedBits;
-  } else {
-    context._currentValue2 = currentValue;
-    context._changedBits2 = changedBits;
-  }
-}
-
-function getContextCurrentValue(context) {
-  return isPrimaryRenderer ? context._currentValue : context._currentValue2;
-}
-
-function getContextChangedBits(context) {
-  return isPrimaryRenderer ? context._changedBits : context._changedBits2;
-}
-
-var NO_CONTEXT = {};
-
-var contextStackCursor$1 = createCursor(NO_CONTEXT);
-var contextFiberStackCursor = createCursor(NO_CONTEXT);
-var rootInstanceStackCursor = createCursor(NO_CONTEXT);
-
-function requiredContext(c) {
-  !(c !== NO_CONTEXT) ? reactProdInvariant('174') : void 0;
-  return c;
-}
-
-function getRootHostContainer() {
-  var rootInstance = requiredContext(rootInstanceStackCursor.current);
-  return rootInstance;
-}
-
-function pushHostContainer(fiber, nextRootInstance) {
-  // Push current root instance onto the stack;
-  // This allows us to reset root when portals are popped.
-  push(rootInstanceStackCursor, nextRootInstance, fiber);
-  // Track the context and the Fiber that provided it.
-  // This enables us to pop only Fibers that provide unique contexts.
-  push(contextFiberStackCursor, fiber, fiber);
-
-  // Finally, we need to push the host context to the stack.
-  // However, we can't just call getRootHostContext() and push it because
-  // we'd have a different number of entries on the stack depending on
-  // whether getRootHostContext() throws somewhere in renderer code or not.
-  // So we push an empty value first. This lets us safely unwind on errors.
-  push(contextStackCursor$1, NO_CONTEXT, fiber);
-  var nextRootContext = getRootHostContext(nextRootInstance);
-  // Now that we know this function doesn't throw, replace it.
-  pop(contextStackCursor$1, fiber);
-  push(contextStackCursor$1, nextRootContext, fiber);
-}
-
-function popHostContainer(fiber) {
-  pop(contextStackCursor$1, fiber);
-  pop(contextFiberStackCursor, fiber);
-  pop(rootInstanceStackCursor, fiber);
-}
-
-function getHostContext() {
-  var context = requiredContext(contextStackCursor$1.current);
-  return context;
-}
-
-function pushHostContext(fiber) {
-  var rootInstance = requiredContext(rootInstanceStackCursor.current);
-  var context = requiredContext(contextStackCursor$1.current);
-  var nextContext = getChildHostContext(context, fiber.type, rootInstance);
-
-  // Don't push this Fiber's context unless it's unique.
-  if (context === nextContext) {
-    return;
-  }
-
-  // Track the context and the Fiber that provided it.
-  // This enables us to pop only Fibers that provide unique contexts.
-  push(contextFiberStackCursor, fiber, fiber);
-  push(contextStackCursor$1, nextContext, fiber);
-}
-
-function popHostContext(fiber) {
-  // Do not pop unless this Fiber provided the current context.
-  // pushHostContext() only pushes Fibers that provide unique contexts.
-  if (contextFiberStackCursor.current !== fiber) {
-    return;
-  }
-
-  pop(contextStackCursor$1, fiber);
-  pop(contextFiberStackCursor, fiber);
-}
-
-var commitTime = 0;
-
-function getCommitTime() {
-  return commitTime;
-}
-
-function recordCommitTime() {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  commitTime = now();
-}
-
-var timerPausedAt = 0;
-var totalElapsedPauseTime = 0;
-
-function markActualRenderTimeStarted(fiber) {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  fiber.actualDuration = now() - fiber.actualDuration - totalElapsedPauseTime;
-  fiber.actualStartTime = now();
-}
-
-function pauseActualRenderTimerIfRunning() {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  if (timerPausedAt === 0) {
-    timerPausedAt = now();
-  }
-}
-
-function recordElapsedActualRenderTime(fiber) {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  fiber.actualDuration = now() - totalElapsedPauseTime - fiber.actualDuration;
-}
-
-function resetActualRenderTimer() {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  totalElapsedPauseTime = 0;
-}
-
-function resumeActualRenderTimerIfPaused() {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  if (timerPausedAt > 0) {
-    totalElapsedPauseTime += now() - timerPausedAt;
-    timerPausedAt = 0;
-  }
-}
-
-/**
- * The "base" render time is the duration of the “begin” phase of work for a particular fiber.
- * This time is measured and stored on each fiber.
- * The time for all sibling fibers are accumulated and stored on their parent during the "complete" phase.
- * If a fiber bails out (sCU false) then its "base" timer is cancelled and the fiber is not updated.
- */
-
-var baseStartTime = -1;
-
-function recordElapsedBaseRenderTimeIfRunning(fiber) {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  if (baseStartTime !== -1) {
-    fiber.selfBaseTime = now() - baseStartTime;
-  }
-}
-
-function startBaseRenderTimer() {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  baseStartTime = now();
-}
-
-function stopBaseRenderTimerIfRunning() {
-  if (!enableProfilerTimer) {
-    return;
-  }
-  baseStartTime = -1;
-}
-
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- * @typechecks
- * 
- */
-
-/*eslint-disable no-self-compare */
-
-
-
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-/**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
-function is(x, y) {
-  // SameValue algorithm
-  if (x === y) {
-    // Steps 1-5, 7-10
-    // Steps 6.b-6.e: +0 != -0
-    // Added the nonzero y check to make Flow happy, but it is redundant
-    return x !== 0 || y !== 0 || 1 / x === 1 / y;
-  } else {
-    // Step 6.a: NaN == NaN
-    return x !== x && y !== y;
-  }
-}
-
-/**
- * Performs equality by iterating through keys on an object and returning false
- * when any key has values which are not strictly equal between the arguments.
- * Returns true when the values of all keys are strictly equal.
- */
-function shallowEqual(objA, objB) {
-  if (is(objA, objB)) {
-    return true;
-  }
-
-  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
-    return false;
-  }
-
-  var keysA = Object.keys(objA);
-  var keysB = Object.keys(objB);
-
-  if (keysA.length !== keysB.length) {
-    return false;
-  }
-
-  // Test for A's keys different from B.
-  for (var i = 0; i < keysA.length; i++) {
-    if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
-      return false;
-    }
-  }
-
-  return true;
-}
-
-var shallowEqual_1 = shallowEqual;
-
-function applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, nextProps) {
-  var prevState = workInProgress.memoizedState;
-
-  var partialState = getDerivedStateFromProps(nextProps, prevState);
-
-  var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
-  workInProgress.memoizedState = memoizedState;
-
-  // Once the update queue is empty, persist the derived state onto the
-  // base state.
-  var updateQueue = workInProgress.updateQueue;
-  if (updateQueue !== null && updateQueue.expirationTime === NoWork) {
-    updateQueue.baseState = memoizedState;
-  }
-}
-
-var classComponentUpdater = {
-  isMounted: isMounted,
-  enqueueSetState: function (inst, payload, callback) {
-    var fiber = get(inst);
-    var currentTime = recalculateCurrentTime();
-    var expirationTime = computeExpirationForFiber(currentTime, fiber);
-
-    var update = createUpdate(expirationTime);
-    update.payload = payload;
-    if (callback !== undefined && callback !== null) {
-      update.callback = callback;
-    }
-
-    enqueueUpdate(fiber, update, expirationTime);
-    scheduleWork(fiber, expirationTime);
-  },
-  enqueueReplaceState: function (inst, payload, callback) {
-    var fiber = get(inst);
-    var currentTime = recalculateCurrentTime();
-    var expirationTime = computeExpirationForFiber(currentTime, fiber);
-
-    var update = createUpdate(expirationTime);
-    update.tag = ReplaceState;
-    update.payload = payload;
-
-    if (callback !== undefined && callback !== null) {
-      update.callback = callback;
-    }
-
-    enqueueUpdate(fiber, update, expirationTime);
-    scheduleWork(fiber, expirationTime);
-  },
-  enqueueForceUpdate: function (inst, callback) {
-    var fiber = get(inst);
-    var currentTime = recalculateCurrentTime();
-    var expirationTime = computeExpirationForFiber(currentTime, fiber);
-
-    var update = createUpdate(expirationTime);
-    update.tag = ForceUpdate;
-
-    if (callback !== undefined && callback !== null) {
-      update.callback = callback;
-    }
-
-    enqueueUpdate(fiber, update, expirationTime);
-    scheduleWork(fiber, expirationTime);
-  }
-};
-
-function checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext) {
-  var instance = workInProgress.stateNode;
-  var ctor = workInProgress.type;
-  if (typeof instance.shouldComponentUpdate === 'function') {
-    startPhaseTimer(workInProgress, 'shouldComponentUpdate');
-    var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newContext);
-    stopPhaseTimer();
-
-    return shouldUpdate;
-  }
-
-  if (ctor.prototype && ctor.prototype.isPureReactComponent) {
-    return !shallowEqual_1(oldProps, newProps) || !shallowEqual_1(oldState, newState);
-  }
-
-  return true;
-}
-
-function adoptClassInstance(workInProgress, instance) {
-  instance.updater = classComponentUpdater;
-  workInProgress.stateNode = instance;
-  // The instance needs access to the fiber so that it can schedule updates
-  set(instance, workInProgress);
-  
-}
-
-function constructClassInstance(workInProgress, props, renderExpirationTime) {
-  var ctor = workInProgress.type;
-  var unmaskedContext = getUnmaskedContext(workInProgress);
-  var needsContext = isContextConsumer(workInProgress);
-  var context = needsContext ? getMaskedContext(workInProgress, unmaskedContext) : emptyObject_1;
-
-  // Instantiate twice to help detect side-effects.
-  var instance = new ctor(props, context);
-  var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
-  adoptClassInstance(workInProgress, instance);
-
-  if (needsContext) {
-    cacheContext(workInProgress, unmaskedContext, context);
-  }
-
-  return instance;
-}
-
-function callComponentWillMount(workInProgress, instance) {
-  startPhaseTimer(workInProgress, 'componentWillMount');
-  var oldState = instance.state;
-
-  if (typeof instance.componentWillMount === 'function') {
-    instance.componentWillMount();
-  }
-  if (typeof instance.UNSAFE_componentWillMount === 'function') {
-    instance.UNSAFE_componentWillMount();
-  }
-
-  stopPhaseTimer();
-
-  if (oldState !== instance.state) {
-    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
-  }
-}
-
-function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {
-  var oldState = instance.state;
-  startPhaseTimer(workInProgress, 'componentWillReceiveProps');
-  if (typeof instance.componentWillReceiveProps === 'function') {
-    instance.componentWillReceiveProps(newProps, newContext);
-  }
-  if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
-    instance.UNSAFE_componentWillReceiveProps(newProps, newContext);
-  }
-  stopPhaseTimer();
-
-  if (instance.state !== oldState) {
-    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
-  }
-}
-
-// Invokes the mount life-cycles on a previously never rendered instance.
-function mountClassInstance(workInProgress, renderExpirationTime) {
-  var ctor = workInProgress.type;
-
-  var instance = workInProgress.stateNode;
-  var props = workInProgress.pendingProps;
-  var unmaskedContext = getUnmaskedContext(workInProgress);
-
-  instance.props = props;
-  instance.state = workInProgress.memoizedState;
-  instance.refs = emptyObject_1;
-  instance.context = getMaskedContext(workInProgress, unmaskedContext);
-
-  var updateQueue = workInProgress.updateQueue;
-  if (updateQueue !== null) {
-    processUpdateQueue(workInProgress, updateQueue, props, instance, renderExpirationTime);
-    instance.state = workInProgress.memoizedState;
-  }
-
-  var getDerivedStateFromProps = workInProgress.type.getDerivedStateFromProps;
-  if (typeof getDerivedStateFromProps === 'function') {
-    applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, props);
-    instance.state = workInProgress.memoizedState;
-  }
-
-  // In order to support react-lifecycles-compat polyfilled components,
-  // Unsafe lifecycles should not be invoked for components using the new APIs.
-  if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
-    callComponentWillMount(workInProgress, instance);
-    // If we had additional state updates during this life-cycle, let's
-    // process them now.
-    updateQueue = workInProgress.updateQueue;
-    if (updateQueue !== null) {
-      processUpdateQueue(workInProgress, updateQueue, props, instance, renderExpirationTime);
-      instance.state = workInProgress.memoizedState;
-    }
-  }
-
-  if (typeof instance.componentDidMount === 'function') {
-    workInProgress.effectTag |= Update;
-  }
-}
-
-function resumeMountClassInstance(workInProgress, renderExpirationTime) {
-  var ctor = workInProgress.type;
-  var instance = workInProgress.stateNode;
-
-  var oldProps = workInProgress.memoizedProps;
-  var newProps = workInProgress.pendingProps;
-  instance.props = oldProps;
-
-  var oldContext = instance.context;
-  var newUnmaskedContext = getUnmaskedContext(workInProgress);
-  var newContext = getMaskedContext(workInProgress, newUnmaskedContext);
-
-  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
-  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';
-
-  // Note: During these life-cycles, instance.props/instance.state are what
-  // ever the previously attempted to render - not the "current". However,
-  // during componentDidUpdate we pass the "current" props.
-
-  // In order to support react-lifecycles-compat polyfilled components,
-  // Unsafe lifecycles should not be invoked for components using the new APIs.
-  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
-    if (oldProps !== newProps || oldContext !== newContext) {
-      callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);
-    }
-  }
-
-  resetHasForceUpdateBeforeProcessing();
-
-  var oldState = workInProgress.memoizedState;
-  var newState = instance.state = oldState;
-  var updateQueue = workInProgress.updateQueue;
-  if (updateQueue !== null) {
-    processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
-    newState = workInProgress.memoizedState;
-  }
-  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
-    // If an update was already in progress, we should schedule an Update
-    // effect even though we're bailing out, so that cWU/cDU are called.
-    if (typeof instance.componentDidMount === 'function') {
-      workInProgress.effectTag |= Update;
-    }
-    return false;
-  }
-
-  if (typeof getDerivedStateFromProps === 'function') {
-    applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, newProps);
-    newState = workInProgress.memoizedState;
-  }
-
-  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);
-
-  if (shouldUpdate) {
-    // In order to support react-lifecycles-compat polyfilled components,
-    // Unsafe lifecycles should not be invoked for components using the new APIs.
-    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
-      startPhaseTimer(workInProgress, 'componentWillMount');
-      if (typeof instance.componentWillMount === 'function') {
-        instance.componentWillMount();
-      }
-      if (typeof instance.UNSAFE_componentWillMount === 'function') {
-        instance.UNSAFE_componentWillMount();
-      }
-      stopPhaseTimer();
-    }
-    if (typeof instance.componentDidMount === 'function') {
-      workInProgress.effectTag |= Update;
-    }
-  } else {
-    // If an update was already in progress, we should schedule an Update
-    // effect even though we're bailing out, so that cWU/cDU are called.
-    if (typeof instance.componentDidMount === 'function') {
-      workInProgress.effectTag |= Update;
-    }
-
-    // If shouldComponentUpdate returned false, we should still update the
-    // memoized state to indicate that this work can be reused.
-    workInProgress.memoizedProps = newProps;
-    workInProgress.memoizedState = newState;
-  }
-
-  // Update the existing instance's state, props, and context pointers even
-  // if shouldComponentUpdate returns false.
-  instance.props = newProps;
-  instance.state = newState;
-  instance.context = newContext;
-
-  return shouldUpdate;
-}
-
-// Invokes the update life-cycles and returns false if it shouldn't rerender.
-function updateClassInstance(current, workInProgress, renderExpirationTime) {
-  var ctor = workInProgress.type;
-  var instance = workInProgress.stateNode;
-
-  var oldProps = workInProgress.memoizedProps;
-  var newProps = workInProgress.pendingProps;
-  instance.props = oldProps;
-
-  var oldContext = instance.context;
-  var newUnmaskedContext = getUnmaskedContext(workInProgress);
-  var newContext = getMaskedContext(workInProgress, newUnmaskedContext);
-
-  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
-  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';
-
-  // Note: During these life-cycles, instance.props/instance.state are what
-  // ever the previously attempted to render - not the "current". However,
-  // during componentDidUpdate we pass the "current" props.
-
-  // In order to support react-lifecycles-compat polyfilled components,
-  // Unsafe lifecycles should not be invoked for components using the new APIs.
-  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
-    if (oldProps !== newProps || oldContext !== newContext) {
-      callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);
-    }
-  }
-
-  resetHasForceUpdateBeforeProcessing();
-
-  var oldState = workInProgress.memoizedState;
-  var newState = instance.state = oldState;
-  var updateQueue = workInProgress.updateQueue;
-  if (updateQueue !== null) {
-    processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
-    newState = workInProgress.memoizedState;
-  }
-
-  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
-    // If an update was already in progress, we should schedule an Update
-    // effect even though we're bailing out, so that cWU/cDU are called.
-    if (typeof instance.componentDidUpdate === 'function') {
-      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
-        workInProgress.effectTag |= Update;
-      }
-    }
-    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
-      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
-        workInProgress.effectTag |= Snapshot;
-      }
-    }
-    return false;
-  }
-
-  if (typeof getDerivedStateFromProps === 'function') {
-    applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, newProps);
-    newState = workInProgress.memoizedState;
-  }
-
-  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);
-
-  if (shouldUpdate) {
-    // In order to support react-lifecycles-compat polyfilled components,
-    // Unsafe lifecycles should not be invoked for components using the new APIs.
-    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
-      startPhaseTimer(workInProgress, 'componentWillUpdate');
-      if (typeof instance.componentWillUpdate === 'function') {
-        instance.componentWillUpdate(newProps, newState, newContext);
-      }
-      if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
-        instance.UNSAFE_componentWillUpdate(newProps, newState, newContext);
-      }
-      stopPhaseTimer();
-    }
-    if (typeof instance.componentDidUpdate === 'function') {
-      workInProgress.effectTag |= Update;
-    }
-    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
-      workInProgress.effectTag |= Snapshot;
-    }
-  } else {
-    // If an update was already in progress, we should schedule an Update
-    // effect even though we're bailing out, so that cWU/cDU are called.
-    if (typeof instance.componentDidUpdate === 'function') {
-      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
-        workInProgress.effectTag |= Update;
-      }
-    }
-    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
-      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
-        workInProgress.effectTag |= Snapshot;
-      }
-    }
-
-    // If shouldComponentUpdate returned false, we should still update the
-    // memoized props/state to indicate that this work can be reused.
-    workInProgress.memoizedProps = newProps;
-    workInProgress.memoizedState = newState;
-  }
-
-  // Update the existing instance's state, props, and context pointers even
-  // if shouldComponentUpdate returns false.
-  instance.props = newProps;
-  instance.state = newState;
-  instance.context = newContext;
-
-  return shouldUpdate;
-}
-
-var isArray$1 = Array.isArray;
-
-function coerceRef(returnFiber, current, element) {
-  var mixedRef = element.ref;
-  if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
-    if (element._owner) {
-      var owner = element._owner;
-      var inst = void 0;
-      if (owner) {
-        var ownerFiber = owner;
-        !(ownerFiber.tag === ClassComponent) ? reactProdInvariant('110') : void 0;
-        inst = ownerFiber.stateNode;
-      }
-      !inst ? reactProdInvariant('147', mixedRef) : void 0;
-      var stringRef = '' + mixedRef;
-      // Check if previous string ref matches new string ref
-      if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
-        return current.ref;
-      }
-      var ref = function (value) {
-        var refs = inst.refs === emptyObject_1 ? inst.refs = {} : inst.refs;
-        if (value === null) {
-          delete refs[stringRef];
-        } else {
-          refs[stringRef] = value;
-        }
-      };
-      ref._stringRef = stringRef;
-      return ref;
-    } else {
-      !(typeof mixedRef === 'string') ? reactProdInvariant('148') : void 0;
-      !element._owner ? reactProdInvariant('254', mixedRef) : void 0;
-    }
-  }
-  return mixedRef;
-}
-
-function throwOnInvalidObjectType(returnFiber, newChild) {
-  if (returnFiber.type !== 'textarea') {
-    var addendum = '';
-    reactProdInvariant('31', Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild, addendum);
-  }
-}
-
-// This wrapper function exists because I expect to clone the code in each path
-// to be able to optimize each path individually by branching early. This needs
-// a compiler or we can do it manually. Helpers that don't need this branching
-// live outside of this function.
-function ChildReconciler(shouldTrackSideEffects) {
-  function deleteChild(returnFiber, childToDelete) {
-    if (!shouldTrackSideEffects) {
-      // Noop.
-      return;
-    }
-    // Deletions are added in reversed order so we add it to the front.
-    // At this point, the return fiber's effect list is empty except for
-    // deletions, so we can just append the deletion to the list. The remaining
-    // effects aren't added until the complete phase. Once we implement
-    // resuming, this may not be true.
-    var last = returnFiber.lastEffect;
-    if (last !== null) {
-      last.nextEffect = childToDelete;
-      returnFiber.lastEffect = childToDelete;
-    } else {
-      returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
-    }
-    childToDelete.nextEffect = null;
-    childToDelete.effectTag = Deletion;
-  }
-
-  function deleteRemainingChildren(returnFiber, currentFirstChild) {
-    if (!shouldTrackSideEffects) {
-      // Noop.
-      return null;
-    }
-
-    // TODO: For the shouldClone case, this could be micro-optimized a bit by
-    // assuming that after the first child we've already added everything.
-    var childToDelete = currentFirstChild;
-    while (childToDelete !== null) {
-      deleteChild(returnFiber, childToDelete);
-      childToDelete = childToDelete.sibling;
-    }
-    return null;
-  }
-
-  function mapRemainingChildren(returnFiber, currentFirstChild) {
-    // Add the remaining children to a temporary map so that we can find them by
-    // keys quickly. Implicit (null) keys get added to this set with their index
-    var existingChildren = new Map();
-
-    var existingChild = currentFirstChild;
-    while (existingChild !== null) {
-      if (existingChild.key !== null) {
-        existingChildren.set(existingChild.key, existingChild);
-      } else {
-        existingChildren.set(existingChild.index, existingChild);
-      }
-      existingChild = existingChild.sibling;
-    }
-    return existingChildren;
-  }
-
-  function useFiber(fiber, pendingProps, expirationTime) {
-    // We currently set sibling to null and index to 0 here because it is easy
-    // to forget to do before returning it. E.g. for the single child case.
-    var clone = createWorkInProgress(fiber, pendingProps, expirationTime);
-    clone.index = 0;
-    clone.sibling = null;
-    return clone;
-  }
-
-  function placeChild(newFiber, lastPlacedIndex, newIndex) {
-    newFiber.index = newIndex;
-    if (!shouldTrackSideEffects) {
-      // Noop.
-      return lastPlacedIndex;
-    }
-    var current = newFiber.alternate;
-    if (current !== null) {
-      var oldIndex = current.index;
-      if (oldIndex < lastPlacedIndex) {
-        // This is a move.
-        newFiber.effectTag = Placement;
-        return lastPlacedIndex;
-      } else {
-        // This item can stay in place.
-        return oldIndex;
-      }
-    } else {
-      // This is an insertion.
-      newFiber.effectTag = Placement;
-      return lastPlacedIndex;
-    }
-  }
-
-  function placeSingleChild(newFiber) {
-    // This is simpler for the single child case. We only need to do a
-    // placement for inserting new children.
-    if (shouldTrackSideEffects && newFiber.alternate === null) {
-      newFiber.effectTag = Placement;
-    }
-    return newFiber;
-  }
-
-  function updateTextNode(returnFiber, current, textContent, expirationTime) {
-    if (current === null || current.tag !== HostText) {
-      // Insert
-      var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
-      created.return = returnFiber;
-      return created;
-    } else {
-      // Update
-      var existing = useFiber(current, textContent, expirationTime);
-      existing.return = returnFiber;
-      return existing;
-    }
-  }
-
-  function updateElement(returnFiber, current, element, expirationTime) {
-    if (current !== null && current.type === element.type) {
-      // Move based on index
-      var existing = useFiber(current, element.props, expirationTime);
-      existing.ref = coerceRef(returnFiber, current, element);
-      existing.return = returnFiber;
-      return existing;
-    } else {
-      // Insert
-      var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
-      created.ref = coerceRef(returnFiber, current, element);
-      created.return = returnFiber;
-      return created;
-    }
-  }
-
-  function updatePortal(returnFiber, current, portal, expirationTime) {
-    if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
-      // Insert
-      var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
-      created.return = returnFiber;
-      return created;
-    } else {
-      // Update
-      var existing = useFiber(current, portal.children || [], expirationTime);
-      existing.return = returnFiber;
-      return existing;
-    }
-  }
-
-  function updateFragment(returnFiber, current, fragment, expirationTime, key) {
-    if (current === null || current.tag !== Fragment) {
-      // Insert
-      var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
-      created.return = returnFiber;
-      return created;
-    } else {
-      // Update
-      var existing = useFiber(current, fragment, expirationTime);
-      existing.return = returnFiber;
-      return existing;
-    }
-  }
-
-  function createChild(returnFiber, newChild, expirationTime) {
-    if (typeof newChild === 'string' || typeof newChild === 'number') {
-      // Text nodes don't have keys. If the previous node is implicitly keyed
-      // we can continue to replace it without aborting even if it is not a text
-      // node.
-      var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
-      created.return = returnFiber;
-      return created;
-    }
-
-    if (typeof newChild === 'object' && newChild !== null) {
-      switch (newChild.$$typeof) {
-        case REACT_ELEMENT_TYPE:
-          {
-            var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);
-            _created.ref = coerceRef(returnFiber, null, newChild);
-            _created.return = returnFiber;
-            return _created;
-          }
-        case REACT_PORTAL_TYPE:
-          {
-            var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
-            _created2.return = returnFiber;
-            return _created2;
-          }
-      }
-
-      if (isArray$1(newChild) || getIteratorFn(newChild)) {
-        var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);
-        _created3.return = returnFiber;
-        return _created3;
-      }
-
-      throwOnInvalidObjectType(returnFiber, newChild);
-    }
-
-    return null;
-  }
-
-  function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
-    // Update the fiber if the keys match, otherwise return null.
-
-    var key = oldFiber !== null ? oldFiber.key : null;
-
-    if (typeof newChild === 'string' || typeof newChild === 'number') {
-      // Text nodes don't have keys. If the previous node is implicitly keyed
-      // we can continue to replace it without aborting even if it is not a text
-      // node.
-      if (key !== null) {
-        return null;
-      }
-      return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
-    }
-
-    if (typeof newChild === 'object' && newChild !== null) {
-      switch (newChild.$$typeof) {
-        case REACT_ELEMENT_TYPE:
-          {
-            if (newChild.key === key) {
-              if (newChild.type === REACT_FRAGMENT_TYPE) {
-                return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
-              }
-              return updateElement(returnFiber, oldFiber, newChild, expirationTime);
-            } else {
-              return null;
-            }
-          }
-        case REACT_PORTAL_TYPE:
-          {
-            if (newChild.key === key) {
-              return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
-            } else {
-              return null;
-            }
-          }
-      }
-
-      if (isArray$1(newChild) || getIteratorFn(newChild)) {
-        if (key !== null) {
-          return null;
-        }
-
-        return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
-      }
-
-      throwOnInvalidObjectType(returnFiber, newChild);
-    }
-
-    return null;
-  }
-
-  function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
-    if (typeof newChild === 'string' || typeof newChild === 'number') {
-      // Text nodes don't have keys, so we neither have to check the old nor
-      // new node for the key. If both are text nodes, they match.
-      var matchedFiber = existingChildren.get(newIdx) || null;
-      return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
-    }
-
-    if (typeof newChild === 'object' && newChild !== null) {
-      switch (newChild.$$typeof) {
-        case REACT_ELEMENT_TYPE:
-          {
-            var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
-            if (newChild.type === REACT_FRAGMENT_TYPE) {
-              return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
-            }
-            return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
-          }
-        case REACT_PORTAL_TYPE:
-          {
-            var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
-            return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
-          }
-      }
-
-      if (isArray$1(newChild) || getIteratorFn(newChild)) {
-        var _matchedFiber3 = existingChildren.get(newIdx) || null;
-        return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
-      }
-
-      throwOnInvalidObjectType(returnFiber, newChild);
-    }
-
-    return null;
-  }
-
-  /**
-   * Warns if there is a duplicate or missing key
-   */
-  function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
-    // This algorithm can't optimize by searching from boths ends since we
-    // don't have backpointers on fibers. I'm trying to see how far we can get
-    // with that model. If it ends up not being worth the tradeoffs, we can
-    // add it later.
-
-    // Even with a two ended optimization, we'd want to optimize for the case
-    // where there are few changes and brute force the comparison instead of
-    // going for the Map. It'd like to explore hitting that path first in
-    // forward-only mode and only go for the Map once we notice that we need
-    // lots of look ahead. This doesn't handle reversal as well as two ended
-    // search but that's unusual. Besides, for the two ended optimization to
-    // work on Iterables, we'd need to copy the whole set.
-
-    // In this first iteration, we'll just live with hitting the bad case
-    // (adding everything to a Map) in for every insert/move.
-
-    // If you change this code, also update reconcileChildrenIterator() which
-    // uses the same algorithm.
-
-    var resultingFirstChild = null;
-    var previousNewFiber = null;
-
-    var oldFiber = currentFirstChild;
-    var lastPlacedIndex = 0;
-    var newIdx = 0;
-    var nextOldFiber = null;
-    for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
-      if (oldFiber.index > newIdx) {
-        nextOldFiber = oldFiber;
-        oldFiber = null;
-      } else {
-        nextOldFiber = oldFiber.sibling;
-      }
-      var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
-      if (newFiber === null) {
-        // TODO: This breaks on empty slots like null children. That's
-        // unfortunate because it triggers the slow path all the time. We need
-        // a better way to communicate whether this was a miss or null,
-        // boolean, undefined, etc.
-        if (oldFiber === null) {
-          oldFiber = nextOldFiber;
-        }
-        break;
-      }
-      if (shouldTrackSideEffects) {
-        if (oldFiber && newFiber.alternate === null) {
-          // We matched the slot, but we didn't reuse the existing fiber, so we
-          // need to delete the existing child.
-          deleteChild(returnFiber, oldFiber);
-        }
-      }
-      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
-      if (previousNewFiber === null) {
-        // TODO: Move out of the loop. This only happens for the first run.
-        resultingFirstChild = newFiber;
-      } else {
-        // TODO: Defer siblings if we're not at the right index for this slot.
-        // I.e. if we had null values before, then we want to defer this
-        // for each null value. However, we also don't want to call updateSlot
-        // with the previous one.
-        previousNewFiber.sibling = newFiber;
-      }
-      previousNewFiber = newFiber;
-      oldFiber = nextOldFiber;
-    }
-
-    if (newIdx === newChildren.length) {
-      // We've reached the end of the new children. We can delete the rest.
-      deleteRemainingChildren(returnFiber, oldFiber);
-      return resultingFirstChild;
-    }
-
-    if (oldFiber === null) {
-      // If we don't have any more existing children we can choose a fast path
-      // since the rest will all be insertions.
-      for (; newIdx < newChildren.length; newIdx++) {
-        var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
-        if (!_newFiber) {
-          continue;
-        }
-        lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
-        if (previousNewFiber === null) {
-          // TODO: Move out of the loop. This only happens for the first run.
-          resultingFirstChild = _newFiber;
-        } else {
-          previousNewFiber.sibling = _newFiber;
-        }
-        previousNewFiber = _newFiber;
-      }
-      return resultingFirstChild;
-    }
-
-    // Add all children to a key map for quick lookups.
-    var existingChildren = mapRemainingChildren(returnFiber, oldFiber);
-
-    // Keep scanning and use the map to restore deleted items as moves.
-    for (; newIdx < newChildren.length; newIdx++) {
-      var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
-      if (_newFiber2) {
-        if (shouldTrackSideEffects) {
-          if (_newFiber2.alternate !== null) {
-            // The new fiber is a work in progress, but if there exists a
-            // current, that means that we reused the fiber. We need to delete
-            // it from the child list so that we don't add it to the deletion
-            // list.
-            existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
-          }
-        }
-        lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
-        if (previousNewFiber === null) {
-          resultingFirstChild = _newFiber2;
-        } else {
-          previousNewFiber.sibling = _newFiber2;
-        }
-        previousNewFiber = _newFiber2;
-      }
-    }
-
-    if (shouldTrackSideEffects) {
-      // Any existing children that weren't consumed above were deleted. We need
-      // to add them to the deletion list.
-      existingChildren.forEach(function (child) {
-        return deleteChild(returnFiber, child);
-      });
-    }
-
-    return resultingFirstChild;
-  }
-
-  function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
-    // This is the same implementation as reconcileChildrenArray(),
-    // but using the iterator instead.
-
-    var iteratorFn = getIteratorFn(newChildrenIterable);
-    !(typeof iteratorFn === 'function') ? reactProdInvariant('150') : void 0;
-
-    var newChildren = iteratorFn.call(newChildrenIterable);
-    !(newChildren != null) ? reactProdInvariant('151') : void 0;
-
-    var resultingFirstChild = null;
-    var previousNewFiber = null;
-
-    var oldFiber = currentFirstChild;
-    var lastPlacedIndex = 0;
-    var newIdx = 0;
-    var nextOldFiber = null;
-
-    var step = newChildren.next();
-    for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
-      if (oldFiber.index > newIdx) {
-        nextOldFiber = oldFiber;
-        oldFiber = null;
-      } else {
-        nextOldFiber = oldFiber.sibling;
-      }
-      var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
-      if (newFiber === null) {
-        // TODO: This breaks on empty slots like null children. That's
-        // unfortunate because it triggers the slow path all the time. We need
-        // a better way to communicate whether this was a miss or null,
-        // boolean, undefined, etc.
-        if (!oldFiber) {
-          oldFiber = nextOldFiber;
-        }
-        break;
-      }
-      if (shouldTrackSideEffects) {
-        if (oldFiber && newFiber.alternate === null) {
-          // We matched the slot, but we didn't reuse the existing fiber, so we
-          // need to delete the existing child.
-          deleteChild(returnFiber, oldFiber);
-        }
-      }
-      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
-      if (previousNewFiber === null) {
-        // TODO: Move out of the loop. This only happens for the first run.
-        resultingFirstChild = newFiber;
-      } else {
-        // TODO: Defer siblings if we're not at the right index for this slot.
-        // I.e. if we had null values before, then we want to defer this
-        // for each null value. However, we also don't want to call updateSlot
-        // with the previous one.
-        previousNewFiber.sibling = newFiber;
-      }
-      previousNewFiber = newFiber;
-      oldFiber = nextOldFiber;
-    }
-
-    if (step.done) {
-      // We've reached the end of the new children. We can delete the rest.
-      deleteRemainingChildren(returnFiber, oldFiber);
-      return resultingFirstChild;
-    }
-
-    if (oldFiber === null) {
-      // If we don't have any more existing children we can choose a fast path
-      // since the rest will all be insertions.
-      for (; !step.done; newIdx++, step = newChildren.next()) {
-        var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
-        if (_newFiber3 === null) {
-          continue;
-        }
-        lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
-        if (previousNewFiber === null) {
-          // TODO: Move out of the loop. This only happens for the first run.
-          resultingFirstChild = _newFiber3;
-        } else {
-          previousNewFiber.sibling = _newFiber3;
-        }
-        previousNewFiber = _newFiber3;
-      }
-      return resultingFirstChild;
-    }
-
-    // Add all children to a key map for quick lookups.
-    var existingChildren = mapRemainingChildren(returnFiber, oldFiber);
-
-    // Keep scanning and use the map to restore deleted items as moves.
-    for (; !step.done; newIdx++, step = newChildren.next()) {
-      var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
-      if (_newFiber4 !== null) {
-        if (shouldTrackSideEffects) {
-          if (_newFiber4.alternate !== null) {
-            // The new fiber is a work in progress, but if there exists a
-            // current, that means that we reused the fiber. We need to delete
-            // it from the child list so that we don't add it to the deletion
-            // list.
-            existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
-          }
-        }
-        lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
-        if (previousNewFiber === null) {
-          resultingFirstChild = _newFiber4;
-        } else {
-          previousNewFiber.sibling = _newFiber4;
-        }
-        previousNewFiber = _newFiber4;
-      }
-    }
-
-    if (shouldTrackSideEffects) {
-      // Any existing children that weren't consumed above were deleted. We need
-      // to add them to the deletion list.
-      existingChildren.forEach(function (child) {
-        return deleteChild(returnFiber, child);
-      });
-    }
-
-    return resultingFirstChild;
-  }
-
-  function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
-    // There's no need to check for keys on text nodes since we don't have a
-    // way to define them.
-    if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
-      // We already have an existing node so let's just update it and delete
-      // the rest.
-      deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
-      var existing = useFiber(currentFirstChild, textContent, expirationTime);
-      existing.return = returnFiber;
-      return existing;
-    }
-    // The existing first child is not a text node so we need to create one
-    // and delete the existing ones.
-    deleteRemainingChildren(returnFiber, currentFirstChild);
-    var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
-    created.return = returnFiber;
-    return created;
-  }
-
-  function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
-    var key = element.key;
-    var child = currentFirstChild;
-    while (child !== null) {
-      // TODO: If key === null and child.key === null, then this only applies to
-      // the first item in the list.
-      if (child.key === key) {
-        if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {
-          deleteRemainingChildren(returnFiber, child.sibling);
-          var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);
-          existing.ref = coerceRef(returnFiber, child, element);
-          existing.return = returnFiber;
-          return existing;
-        } else {
-          deleteRemainingChildren(returnFiber, child);
-          break;
-        }
-      } else {
-        deleteChild(returnFiber, child);
-      }
-      child = child.sibling;
-    }
-
-    if (element.type === REACT_FRAGMENT_TYPE) {
-      var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
-      created.return = returnFiber;
-      return created;
-    } else {
-      var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);
-      _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
-      _created4.return = returnFiber;
-      return _created4;
-    }
-  }
-
-  function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
-    var key = portal.key;
-    var child = currentFirstChild;
-    while (child !== null) {
-      // TODO: If key === null and child.key === null, then this only applies to
-      // the first item in the list.
-      if (child.key === key) {
-        if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
-          deleteRemainingChildren(returnFiber, child.sibling);
-          var existing = useFiber(child, portal.children || [], expirationTime);
-          existing.return = returnFiber;
-          return existing;
-        } else {
-          deleteRemainingChildren(returnFiber, child);
-          break;
-        }
-      } else {
-        deleteChild(returnFiber, child);
-      }
-      child = child.sibling;
-    }
-
-    var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
-    created.return = returnFiber;
-    return created;
-  }
-
-  // This API will tag the children with the side-effect of the reconciliation
-  // itself. They will be added to the side-effect list as we pass through the
-  // children and the parent.
-  function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
-    // This function is not recursive.
-    // If the top level item is an array, we treat it as a set of children,
-    // not as a fragment. Nested arrays on the other hand will be treated as
-    // fragment nodes. Recursion happens at the normal flow.
-
-    // Handle top level unkeyed fragments as if they were arrays.
-    // This leads to an ambiguity between <>{[...]}</> and <>...</>.
-    // We treat the ambiguous cases above the same.
-    var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
-    if (isUnkeyedTopLevelFragment) {
-      newChild = newChild.props.children;
-    }
-
-    // Handle object types
-    var isObject = typeof newChild === 'object' && newChild !== null;
-
-    if (isObject) {
-      switch (newChild.$$typeof) {
-        case REACT_ELEMENT_TYPE:
-          return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
-        case REACT_PORTAL_TYPE:
-          return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
-      }
-    }
-
-    if (typeof newChild === 'string' || typeof newChild === 'number') {
-      return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
-    }
-
-    if (isArray$1(newChild)) {
-      return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
-    }
-
-    if (getIteratorFn(newChild)) {
-      return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
-    }
-
-    if (isObject) {
-      throwOnInvalidObjectType(returnFiber, newChild);
-    }
-
-    if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
-      // If the new child is undefined, and the return fiber is a composite
-      // component, throw an error. If Fiber return types are disabled,
-      // we already threw above.
-      switch (returnFiber.tag) {
-        case ClassComponent:
-          {
-            
-          }
-        // Intentionally fall through to the next case, which handles both
-        // functions and classes
-        // eslint-disable-next-lined no-fallthrough
-        case FunctionalComponent:
-          {
-            var Component = returnFiber.type;
-            reactProdInvariant('152', Component.displayName || Component.name || 'Component');
-          }
-      }
-    }
-
-    // Remaining cases are all treated as empty.
-    return deleteRemainingChildren(returnFiber, currentFirstChild);
-  }
-
-  return reconcileChildFibers;
-}
-
-var reconcileChildFibers = ChildReconciler(true);
-var mountChildFibers = ChildReconciler(false);
-
-function cloneChildFibers(current, workInProgress) {
-  !(current === null || workInProgress.child === current.child) ? reactProdInvariant('153') : void 0;
-
-  if (workInProgress.child === null) {
-    return;
-  }
-
-  var currentChild = workInProgress.child;
-  var newChild = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
-  workInProgress.child = newChild;
-
-  newChild.return = workInProgress;
-  while (currentChild.sibling !== null) {
-    currentChild = currentChild.sibling;
-    newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
-    newChild.return = workInProgress;
-  }
-  newChild.sibling = null;
-}
-
-// The deepest Fiber on the stack involved in a hydration context.
-// This may have been an insertion or a hydration.
-var hydrationParentFiber = null;
-var nextHydratableInstance = null;
-var isHydrating = false;
-
-function enterHydrationState(fiber) {
-  if (!supportsHydration) {
-    return false;
-  }
-
-  var parentInstance = fiber.stateNode.containerInfo;
-  nextHydratableInstance = getFirstHydratableChild(parentInstance);
-  hydrationParentFiber = fiber;
-  isHydrating = true;
-  return true;
-}
-
-function deleteHydratableInstance(returnFiber, instance) {
-  var childToDelete = createFiberFromHostInstanceForDeletion();
-  childToDelete.stateNode = instance;
-  childToDelete.return = returnFiber;
-  childToDelete.effectTag = Deletion;
-
-  // This might seem like it belongs on progressedFirstDeletion. However,
-  // these children are not part of the reconciliation list of children.
-  // Even if we abort and rereconcile the children, that will try to hydrate
-  // again and the nodes are still in the host tree so these will be
-  // recreated.
-  if (returnFiber.lastEffect !== null) {
-    returnFiber.lastEffect.nextEffect = childToDelete;
-    returnFiber.lastEffect = childToDelete;
-  } else {
-    returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
-  }
-}
-
-function insertNonHydratedInstance(returnFiber, fiber) {
-  fiber.effectTag |= Placement;
-  
-}
-
-function tryHydrate(fiber, nextInstance) {
-  switch (fiber.tag) {
-    case HostComponent:
-      {
-        var type = fiber.type;
-        var props = fiber.pendingProps;
-        var instance = canHydrateInstance(nextInstance, type, props);
-        if (instance !== null) {
-          fiber.stateNode = instance;
-          return true;
-        }
-        return false;
-      }
-    case HostText:
-      {
-        var text = fiber.pendingProps;
-        var textInstance = canHydrateTextInstance(nextInstance, text);
-        if (textInstance !== null) {
-          fiber.stateNode = textInstance;
-          return true;
-        }
-        return false;
-      }
-    default:
-      return false;
-  }
-}
-
-function tryToClaimNextHydratableInstance(fiber) {
-  if (!isHydrating) {
-    return;
-  }
-  var nextInstance = nextHydratableInstance;
-  if (!nextInstance) {
-    // Nothing to hydrate. Make it an insertion.
-    insertNonHydratedInstance(hydrationParentFiber, fiber);
-    isHydrating = false;
-    hydrationParentFiber = fiber;
-    return;
-  }
-  var firstAttemptedInstance = nextInstance;
-  if (!tryHydrate(fiber, nextInstance)) {
-    // If we can't hydrate this instance let's try the next one.
-    // We use this as a heuristic. It's based on intuition and not data so it
-    // might be flawed or unnecessary.
-    nextInstance = getNextHydratableSibling(firstAttemptedInstance);
-    if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
-      // Nothing to hydrate. Make it an insertion.
-      insertNonHydratedInstance(hydrationParentFiber, fiber);
-      isHydrating = false;
-      hydrationParentFiber = fiber;
-      return;
-    }
-    // We matched the next one, we'll now assume that the first one was
-    // superfluous and we'll delete it. Since we can't eagerly delete it
-    // we'll have to schedule a deletion. To do that, this node needs a dummy
-    // fiber associated with it.
-    deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
-  }
-  hydrationParentFiber = fiber;
-  nextHydratableInstance = getFirstHydratableChild(nextInstance);
-}
-
-function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
-  if (!supportsHydration) {
-    reactProdInvariant('175');
-  }
-
-  var instance = fiber.stateNode;
-  var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber);
-  // TODO: Type this specific to this type of component.
-  fiber.updateQueue = updatePayload;
-  // If the update payload indicates that there is a change or if there
-  // is a new ref we mark this as an update.
-  if (updatePayload !== null) {
-    return true;
-  }
-  return false;
-}
-
-function prepareToHydrateHostTextInstance(fiber) {
-  if (!supportsHydration) {
-    reactProdInvariant('176');
-  }
-
-  var textInstance = fiber.stateNode;
-  var textContent = fiber.memoizedProps;
-  var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
-  return shouldUpdate;
-}
-
-function popToNextHostParent(fiber) {
-  var parent = fiber.return;
-  while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot) {
-    parent = parent.return;
-  }
-  hydrationParentFiber = parent;
-}
-
-function popHydrationState(fiber) {
-  if (!supportsHydration) {
-    return false;
-  }
-  if (fiber !== hydrationParentFiber) {
-    // We're deeper than the current hydration context, inside an inserted
-    // tree.
-    return false;
-  }
-  if (!isHydrating) {
-    // If we're not currently hydrating but we're in a hydration context, then
-    // we were an insertion and now need to pop up reenter hydration of our
-    // siblings.
-    popToNextHostParent(fiber);
-    isHydrating = true;
-    return false;
-  }
-
-  var type = fiber.type;
-
-  // If we have any remaining hydratable nodes, we need to delete them now.
-  // We only do this deeper than head and body since they tend to have random
-  // other nodes in them. We also ignore components with pure text content in
-  // side of them.
-  // TODO: Better heuristic.
-  if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
-    var nextInstance = nextHydratableInstance;
-    while (nextInstance) {
-      deleteHydratableInstance(fiber, nextInstance);
-      nextInstance = getNextHydratableSibling(nextInstance);
-    }
-  }
-
-  popToNextHostParent(fiber);
-  nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
-  return true;
-}
-
-function resetHydrationState() {
-  if (!supportsHydration) {
-    return;
-  }
-
-  hydrationParentFiber = null;
-  nextHydratableInstance = null;
-  isHydrating = false;
-}
-
-// TODO: Remove this and use reconcileChildrenAtExpirationTime directly.
-function reconcileChildren(current, workInProgress, nextChildren) {
-  reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, workInProgress.expirationTime);
-}
-
-function reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime) {
-  if (current === null) {
-    // If this is a fresh new component that hasn't been rendered yet, we
-    // won't update its child set by applying minimal side-effects. Instead,
-    // we will add them all to the child before it gets rendered. That means
-    // we can optimize this reconciliation pass by not tracking side-effects.
-    workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
-  } else {
-    // If the current child is the same as the work in progress, it means that
-    // we haven't yet started any work on these children. Therefore, we use
-    // the clone algorithm to create a copy of all the current children.
-
-    // If we had any progressed work already, that is invalid at this point so
-    // let's throw it out.
-    workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
-  }
-}
-
-function updateForwardRef(current, workInProgress) {
-  var render = workInProgress.type.render;
-  var nextProps = workInProgress.pendingProps;
-  var ref = workInProgress.ref;
-  if (hasContextChanged()) {
-    // Normally we can bail out on props equality but if context has changed
-    // we don't do the bailout and we have to reuse existing props instead.
-  } else if (workInProgress.memoizedProps === nextProps) {
-    var currentRef = current !== null ? current.ref : null;
-    if (ref === currentRef) {
-      return bailoutOnAlreadyFinishedWork(current, workInProgress);
-    }
-  }
-
-  var nextChildren = void 0;
-  {
-    nextChildren = render(nextProps, ref);
-  }
-
-  reconcileChildren(current, workInProgress, nextChildren);
-  memoizeProps(workInProgress, nextProps);
-  return workInProgress.child;
-}
-
-function updateFragment(current, workInProgress) {
-  var nextChildren = workInProgress.pendingProps;
-  if (hasContextChanged()) {
-    // Normally we can bail out on props equality but if context has changed
-    // we don't do the bailout and we have to reuse existing props instead.
-  } else if (workInProgress.memoizedProps === nextChildren) {
-    return bailoutOnAlreadyFinishedWork(current, workInProgress);
-  }
-  reconcileChildren(current, workInProgress, nextChildren);
-  memoizeProps(workInProgress, nextChildren);
-  return workInProgress.child;
-}
-
-function updateMode(current, workInProgress) {
-  var nextChildren = workInProgress.pendingProps.children;
-  if (hasContextChanged()) {
-    // Normally we can bail out on props equality but if context has changed
-    // we don't do the bailout and we have to reuse existing props instead.
-  } else if (nextChildren === null || workInProgress.memoizedProps === nextChildren) {
-    return bailoutOnAlreadyFinishedWork(current, workInProgress);
-  }
-  reconcileChildren(current, workInProgress, nextChildren);
-  memoizeProps(workInProgress, nextChildren);
-  return workInProgress.child;
-}
-
-function updateProfiler(current, workInProgress) {
-  var nextProps = workInProgress.pendingProps;
-  if (enableProfilerTimer) {
-    workInProgress.effectTag |= Update;
-  }
-  if (workInProgress.memoizedProps === nextProps) {
-    return bailoutOnAlreadyFinishedWork(current, workInProgress);
-  }
-  var nextChildren = nextProps.children;
-  reconcileChildren(current, workInProgress, nextChildren);
-  memoizeProps(workInProgress, nextProps);
-  return workInProgress.child;
-}
-
-function markRef(current, workInProgress) {
-  var ref = workInProgress.ref;
-  if (current === null && ref !== null || current !== null && current.ref !== ref) {
-    // Schedule a Ref effect
-    workInProgress.effectTag |= Ref;
-  }
-}
-
-function updateFunctionalComponent(current, workInProgress) {
-  var fn = workInProgress.type;
-  var nextProps = workInProgress.pendingProps;
-
-  if (hasContextChanged()) {
-    // Normally we can bail out on props equality but if context has changed
-    // we don't do the bailout and we have to reuse existing props instead.
-  } else {
-    if (workInProgress.memoizedProps === nextProps) {
-      return bailoutOnAlreadyFinishedWork(current, workInProgress);
-    }
-    // TODO: consider bringing fn.shouldComponentUpdate() back.
-    // It used to be here.
-  }
-
-  var unmaskedContext = getUnmaskedContext(workInProgress);
-  var context = getMaskedContext(workInProgress, unmaskedContext);
-
-  var nextChildren = void 0;
-
-  {
-    nextChildren = fn(nextProps, context);
-  }
-  // React DevTools reads this flag.
-  workInProgress.effectTag |= PerformedWork;
-  reconcileChildren(current, workInProgress, nextChildren);
-  memoizeProps(workInProgress, nextProps);
-  return workInProgress.child;
-}
-
-function updateClassComponent(current, workInProgress, renderExpirationTime) {
-  // Push context providers early to prevent context stack mismatches.
-  // During mounting we don't know the child context yet as the instance doesn't exist.
-  // We will invalidate the child context in finishClassComponent() right after rendering.
-  var hasContext = pushContextProvider(workInProgress);
-  var shouldUpdate = void 0;
-  if (current === null) {
-    if (workInProgress.stateNode === null) {
-      // In the initial pass we might need to construct the instance.
-      constructClassInstance(workInProgress, workInProgress.pendingProps, renderExpirationTime);
-      mountClassInstance(workInProgress, renderExpirationTime);
-
-      shouldUpdate = true;
-    } else {
-      // In a resume, we'll already have an instance we can reuse.
-      shouldUpdate = resumeMountClassInstance(workInProgress, renderExpirationTime);
-    }
-  } else {
-    shouldUpdate = updateClassInstance(current, workInProgress, renderExpirationTime);
-  }
-  return finishClassComponent(current, workInProgress, shouldUpdate, hasContext, renderExpirationTime);
-}
-
-function finishClassComponent(current, workInProgress, shouldUpdate, hasContext, renderExpirationTime) {
-  // Refs should update even if shouldComponentUpdate returns false
-  markRef(current, workInProgress);
-
-  var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;
-
-  if (!shouldUpdate && !didCaptureError) {
-    // Context providers should defer to sCU for rendering
-    if (hasContext) {
-      invalidateContextProvider(workInProgress, false);
-    }
-
-    return bailoutOnAlreadyFinishedWork(current, workInProgress);
-  }
-
-  var ctor = workInProgress.type;
-  var instance = workInProgress.stateNode;
-
-  // Rerender
-  ReactCurrentOwner.current = workInProgress;
-  var nextChildren = void 0;
-  if (didCaptureError && (!enableGetDerivedStateFromCatch || typeof ctor.getDerivedStateFromCatch !== 'function')) {
-    // If we captured an error, but getDerivedStateFrom catch is not defined,
-    // unmount all the children. componentDidCatch will schedule an update to
-    // re-render a fallback. This is temporary until we migrate everyone to
-    // the new API.
-    // TODO: Warn in a future release.
-    nextChildren = null;
-
-    if (enableProfilerTimer) {
-      stopBaseRenderTimerIfRunning();
-    }
-  } else {
-    {
-      nextChildren = instance.render();
-    }
-  }
-
-  // React DevTools reads this flag.
-  workInProgress.effectTag |= PerformedWork;
-  if (didCaptureError) {
-    // If we're recovering from an error, reconcile twice: first to delete
-    // all the existing children.
-    reconcileChildrenAtExpirationTime(current, workInProgress, null, renderExpirationTime);
-    workInProgress.child = null;
-    // Now we can continue reconciling like normal. This has the effect of
-    // remounting all children regardless of whether their their
-    // identity matches.
-  }
-  reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime);
-  // Memoize props and state using the values we just used to render.
-  // TODO: Restructure so we never read values from the instance.
-  memoizeState(workInProgress, instance.state);
-  memoizeProps(workInProgress, instance.props);
-
-  // The context might have changed so we need to recalculate it.
-  if (hasContext) {
-    invalidateContextProvider(workInProgress, true);
-  }
-
-  return workInProgress.child;
-}
-
-function pushHostRootContext(workInProgress) {
-  var root = workInProgress.stateNode;
-  if (root.pendingContext) {
-    pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
-  } else if (root.context) {
-    // Should always be set
-    pushTopLevelContextObject(workInProgress, root.context, false);
-  }
-  pushHostContainer(workInProgress, root.containerInfo);
-}
-
-function updateHostRoot(current, workInProgress, renderExpirationTime) {
-  pushHostRootContext(workInProgress);
-  var updateQueue = workInProgress.updateQueue;
-  if (updateQueue !== null) {
-    var nextProps = workInProgress.pendingProps;
-    var prevState = workInProgress.memoizedState;
-    var prevChildren = prevState !== null ? prevState.element : null;
-    processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime);
-    var nextState = workInProgress.memoizedState;
-    // Caution: React DevTools currently depends on this property
-    // being called "element".
-    var nextChildren = nextState.element;
-
-    if (nextChildren === prevChildren) {
-      // If the state is the same as before, that's a bailout because we had
-      // no work that expires at this time.
-      resetHydrationState();
-      return bailoutOnAlreadyFinishedWork(current, workInProgress);
-    }
-    var root = workInProgress.stateNode;
-    if ((current === null || current.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
-      // If we don't have any current children this might be the first pass.
-      // We always try to hydrate. If this isn't a hydration pass there won't
-      // be any children to hydrate which is effectively the same thing as
-      // not hydrating.
-
-      // This is a bit of a hack. We track the host root as a placement to
-      // know that we're currently in a mounting state. That way isMounted
-      // works as expected. We must reset this before committing.
-      // TODO: Delete this when we delete isMounted and findDOMNode.
-      workInProgress.effectTag |= Placement;
-
-      // Ensure that children mount into this root without tracking
-      // side-effects. This ensures that we don't store Placement effects on
-      // nodes that will be hydrated.
-      workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
-    } else {
-      // Otherwise reset hydration state in case we aborted and resumed another
-      // root.
-      resetHydrationState();
-      reconcileChildren(current, workInProgress, nextChildren);
-    }
-    return workInProgress.child;
-  }
-  resetHydrationState();
-  // If there is no update queue, that's a bailout because the root has no props.
-  return bailoutOnAlreadyFinishedWork(current, workInProgress);
-}
-
-function updateHostComponent(current, workInProgress, renderExpirationTime) {
-  pushHostContext(workInProgress);
-
-  if (current === null) {
-    tryToClaimNextHydratableInstance(workInProgress);
-  }
-
-  var type = workInProgress.type;
-  var memoizedProps = workInProgress.memoizedProps;
-  var nextProps = workInProgress.pendingProps;
-  var prevProps = current !== null ? current.memoizedProps : null;
-
-  if (hasContextChanged()) {
-    // Normally we can bail out on props equality but if context has changed
-    // we don't do the bailout and we have to reuse existing props instead.
-  } else if (memoizedProps === nextProps) {
-    var isHidden = workInProgress.mode & AsyncMode && shouldDeprioritizeSubtree(type, nextProps);
-    if (isHidden) {
-      // Before bailing out, make sure we've deprioritized a hidden component.
-      workInProgress.expirationTime = Never;
-    }
-    if (!isHidden || renderExpirationTime !== Never) {
-      return bailoutOnAlreadyFinishedWork(current, workInProgress);
-    }
-    // If we're rendering a hidden node at hidden priority, don't bailout. The
-    // parent is complete, but the children may not be.
-  }
-
-  var nextChildren = nextProps.children;
-  var isDirectTextChild = shouldSetTextContent(type, nextProps);
-
-  if (isDirectTextChild) {
-    // We special case a direct text child of a host node. This is a common
-    // case. We won't handle it as a reified child. We will instead handle
-    // this in the host environment that also have access to this prop. That
-    // avoids allocating another HostText fiber and traversing it.
-    nextChildren = null;
-  } else if (prevProps && shouldSetTextContent(type, prevProps)) {
-    // If we're switching from a direct text child to a normal child, or to
-    // empty, we need to schedule the text content to be reset.
-    workInProgress.effectTag |= ContentReset;
-  }
-
-  markRef(current, workInProgress);
-
-  // Check the host config to see if the children are offscreen/hidden.
-  if (renderExpirationTime !== Never && workInProgress.mode & AsyncMode && shouldDeprioritizeSubtree(type, nextProps)) {
-    // Down-prioritize the children.
-    workInProgress.expirationTime = Never;
-    // Bailout and come back to this fiber later.
-    workInProgress.memoizedProps = nextProps;
-    return null;
-  }
-
-  reconcileChildren(current, workInProgress, nextChildren);
-  memoizeProps(workInProgress, nextProps);
-  return workInProgress.child;
-}
-
-function updateHostText(current, workInProgress) {
-  if (current === null) {
-    tryToClaimNextHydratableInstance(workInProgress);
-  }
-  var nextProps = workInProgress.pendingProps;
-  memoizeProps(workInProgress, nextProps);
-  // Nothing to do here. This is terminal. We'll do the completion step
-  // immediately after.
-  return null;
-}
-
-function mountIndeterminateComponent(current, workInProgress, renderExpirationTime) {
-  !(current === null) ? reactProdInvariant('155') : void 0;
-  var fn = workInProgress.type;
-  var props = workInProgress.pendingProps;
-  var unmaskedContext = getUnmaskedContext(workInProgress);
-  var context = getMaskedContext(workInProgress, unmaskedContext);
-
-  var value = void 0;
-
-  {
-    value = fn(props, context);
-  }
-  // React DevTools reads this flag.
-  workInProgress.effectTag |= PerformedWork;
-
-  if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
-    var Component = workInProgress.type;
-
-    // Proceed under the assumption that this is a class instance
-    workInProgress.tag = ClassComponent;
-
-    workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
-
-    var getDerivedStateFromProps = Component.getDerivedStateFromProps;
-    if (typeof getDerivedStateFromProps === 'function') {
-      applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, props);
-    }
-
-    // Push context providers early to prevent context stack mismatches.
-    // During mounting we don't know the child context yet as the instance doesn't exist.
-    // We will invalidate the child context in finishClassComponent() right after rendering.
-    var hasContext = pushContextProvider(workInProgress);
-    adoptClassInstance(workInProgress, value);
-    mountClassInstance(workInProgress, renderExpirationTime);
-    return finishClassComponent(current, workInProgress, true, hasContext, renderExpirationTime);
-  } else {
-    // Proceed under the assumption that this is a functional component
-    workInProgress.tag = FunctionalComponent;
-    reconcileChildren(current, workInProgress, value);
-    memoizeProps(workInProgress, props);
-    return workInProgress.child;
-  }
-}
-
-function updateTimeoutComponent(current, workInProgress, renderExpirationTime) {
-  if (enableSuspense) {
-    var nextProps = workInProgress.pendingProps;
-    var prevProps = workInProgress.memoizedProps;
-
-    var prevDidTimeout = workInProgress.memoizedState;
-
-    // Check if we already attempted to render the normal state. If we did,
-    // and we timed out, render the placeholder state.
-    var alreadyCaptured = (workInProgress.effectTag & DidCapture) === NoEffect;
-    var nextDidTimeout = !alreadyCaptured;
-
-    if (hasContextChanged()) {
-      // Normally we can bail out on props equality but if context has changed
-      // we don't do the bailout and we have to reuse existing props instead.
-    } else if (nextProps === prevProps && nextDidTimeout === prevDidTimeout) {
-      return bailoutOnAlreadyFinishedWork(current, workInProgress);
-    }
-
-    var render = nextProps.children;
-    var nextChildren = render(nextDidTimeout);
-    workInProgress.memoizedProps = nextProps;
-    workInProgress.memoizedState = nextDidTimeout;
-    reconcileChildren(current, workInProgress, nextChildren);
-    return workInProgress.child;
-  } else {
-    return null;
-  }
-}
-
-function updatePortalComponent(current, workInProgress, renderExpirationTime) {
-  pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
-  var nextChildren = workInProgress.pendingProps;
-  if (hasContextChanged()) {
-    // Normally we can bail out on props equality but if context has changed
-    // we don't do the bailout and we have to reuse existing props instead.
-  } else if (workInProgress.memoizedProps === nextChildren) {
-    return bailoutOnAlreadyFinishedWork(current, workInProgress);
-  }
-
-  if (current === null) {
-    // Portals are special because we don't append the children during mount
-    // but at commit. Therefore we need to track insertions which the normal
-    // flow doesn't do during mount. This doesn't happen at the root because
-    // the root always starts with a "current" with a null child.
-    // TODO: Consider unifying this with how the root works.
-    workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
-    memoizeProps(workInProgress, nextChildren);
-  } else {
-    reconcileChildren(current, workInProgress, nextChildren);
-    memoizeProps(workInProgress, nextChildren);
-  }
-  return workInProgress.child;
-}
-
-function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
-  var fiber = workInProgress.child;
-  if (fiber !== null) {
-    // Set the return pointer of the child to the work-in-progress fiber.
-    fiber.return = workInProgress;
-  }
-  while (fiber !== null) {
-    var nextFiber = void 0;
-    // Visit this fiber.
-    switch (fiber.tag) {
-      case ContextConsumer:
-        // Check if the context matches.
-        var observedBits = fiber.stateNode | 0;
-        if (fiber.type === context && (observedBits & changedBits) !== 0) {
-          // Update the expiration time of all the ancestors, including
-          // the alternates.
-          var node = fiber;
-          while (node !== null) {
-            var alternate = node.alternate;
-            if (node.expirationTime === NoWork || node.expirationTime > renderExpirationTime) {
-              node.expirationTime = renderExpirationTime;
-              if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > renderExpirationTime)) {
-                alternate.expirationTime = renderExpirationTime;
-              }
-            } else if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > renderExpirationTime)) {
-              alternate.expirationTime = renderExpirationTime;
-            } else {
-              // Neither alternate was updated, which means the rest of the
-              // ancestor path already has sufficient priority.
-              break;
-            }
-            node = node.return;
-          }
-          // Don't scan deeper than a matching consumer. When we render the
-          // consumer, we'll continue scanning from that point. This way the
-          // scanning work is time-sliced.
-          nextFiber = null;
-        } else {
-          // Traverse down.
-          nextFiber = fiber.child;
-        }
-        break;
-      case ContextProvider:
-        // Don't scan deeper if this is a matching provider
-        nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
-        break;
-      default:
-        // Traverse down.
-        nextFiber = fiber.child;
-        break;
-    }
-    if (nextFiber !== null) {
-      // Set the return pointer of the child to the work-in-progress fiber.
-      nextFiber.return = fiber;
-    } else {
-      // No child. Traverse to next sibling.
-      nextFiber = fiber;
-      while (nextFiber !== null) {
-        if (nextFiber === workInProgress) {
-          // We're back to the root of this subtree. Exit.
-          nextFiber = null;
-          break;
-        }
-        var sibling = nextFiber.sibling;
-        if (sibling !== null) {
-          // Set the return pointer of the sibling to the work-in-progress fiber.
-          sibling.return = nextFiber.return;
-          nextFiber = sibling;
-          break;
-        }
-        // No more siblings. Traverse up.
-        nextFiber = nextFiber.return;
-      }
-    }
-    fiber = nextFiber;
-  }
-}
-
-function updateContextProvider(current, workInProgress, renderExpirationTime) {
-  var providerType = workInProgress.type;
-  var context = providerType._context;
-
-  var newProps = workInProgress.pendingProps;
-  var oldProps = workInProgress.memoizedProps;
-  var canBailOnProps = true;
-
-  if (hasContextChanged()) {
-    canBailOnProps = false;
-    // Normally we can bail out on props equality but if context has changed
-    // we don't do the bailout and we have to reuse existing props instead.
-  } else if (oldProps === newProps) {
-    workInProgress.stateNode = 0;
-    pushProvider(workInProgress);
-    return bailoutOnAlreadyFinishedWork(current, workInProgress);
-  }
-
-  var newValue = newProps.value;
-  workInProgress.memoizedProps = newProps;
-
-  var changedBits = void 0;
-  if (oldProps === null) {
-    // Initial render
-    changedBits = MAX_SIGNED_31_BIT_INT;
-  } else {
-    if (oldProps.value === newProps.value) {
-      // No change. Bailout early if children are the same.
-      if (oldProps.children === newProps.children && canBailOnProps) {
-        workInProgress.stateNode = 0;
-        pushProvider(workInProgress);
-        return bailoutOnAlreadyFinishedWork(current, workInProgress);
-      }
-      changedBits = 0;
-    } else {
-      var oldValue = oldProps.value;
-      // Use Object.is to compare the new context value to the old value.
-      // Inlined Object.is polyfill.
-      // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
-      if (oldValue === newValue && (oldValue !== 0 || 1 / oldValue === 1 / newValue) || oldValue !== oldValue && newValue !== newValue // eslint-disable-line no-self-compare
-      ) {
-          // No change. Bailout early if children are the same.
-          if (oldProps.children === newProps.children && canBailOnProps) {
-            workInProgress.stateNode = 0;
-            pushProvider(workInProgress);
-            return bailoutOnAlreadyFinishedWork(current, workInProgress);
-          }
-          changedBits = 0;
-        } else {
-        changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
-        changedBits |= 0;
-
-        if (changedBits === 0) {
-          // No change. Bailout early if children are the same.
-          if (oldProps.children === newProps.children && canBailOnProps) {
-            workInProgress.stateNode = 0;
-            pushProvider(workInProgress);
-            return bailoutOnAlreadyFinishedWork(current, workInProgress);
-          }
-        } else {
-          propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
-        }
-      }
-    }
-  }
-
-  workInProgress.stateNode = changedBits;
-  pushProvider(workInProgress);
-
-  var newChildren = newProps.children;
-  reconcileChildren(current, workInProgress, newChildren);
-  return workInProgress.child;
-}
-
-function updateContextConsumer(current, workInProgress, renderExpirationTime) {
-  var context = workInProgress.type;
-  var newProps = workInProgress.pendingProps;
-  var oldProps = workInProgress.memoizedProps;
-
-  var newValue = getContextCurrentValue(context);
-  var changedBits = getContextChangedBits(context);
-
-  if (hasContextChanged()) {
-    // Normally we can bail out on props equality but if context has changed
-    // we don't do the bailout and we have to reuse existing props instead.
-  } else if (changedBits === 0 && oldProps === newProps) {
-    return bailoutOnAlreadyFinishedWork(current, workInProgress);
-  }
-  workInProgress.memoizedProps = newProps;
-
-  var observedBits = newProps.unstable_observedBits;
-  if (observedBits === undefined || observedBits === null) {
-    // Subscribe to all changes by default
-    observedBits = MAX_SIGNED_31_BIT_INT;
-  }
-  // Store the observedBits on the fiber's stateNode for quick access.
-  workInProgress.stateNode = observedBits;
-
-  if ((changedBits & observedBits) !== 0) {
-    // Context change propagation stops at matching consumers, for time-
-    // slicing. Continue the propagation here.
-    propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
-  } else if (oldProps === newProps) {
-    // Skip over a memoized parent with a bitmask bailout even
-    // if we began working on it because of a deeper matching child.
-    return bailoutOnAlreadyFinishedWork(current, workInProgress);
-  }
-  // There is no bailout on `children` equality because we expect people
-  // to often pass a bound method as a child, but it may reference
-  // `this.state` or `this.props` (and thus needs to re-render on `setState`).
-
-  var render = newProps.children;
-
-  var newChildren = void 0;
-  {
-    newChildren = render(newValue);
-  }
-
-  // React DevTools reads this flag.
-  workInProgress.effectTag |= PerformedWork;
-  reconcileChildren(current, workInProgress, newChildren);
-  return workInProgress.child;
-}
-
-/*
-  function reuseChildrenEffects(returnFiber : Fiber, firstChild : Fiber) {
-    let child = firstChild;
-    do {
-      // Ensure that the first and last effect of the parent corresponds
-      // to the children's first and last effect.
-      if (!returnFiber.firstEffect) {
-        returnFiber.firstEffect = child.firstEffect;
-      }
-      if (child.lastEffect) {
-        if (returnFiber.lastEffect) {
-          returnFiber.lastEffect.nextEffect = child.firstEffect;
-        }
-        returnFiber.lastEffect = child.lastEffect;
-      }
-    } while (child = child.sibling);
-  }
-  */
-
-function bailoutOnAlreadyFinishedWork(current, workInProgress) {
-  cancelWorkTimer(workInProgress);
-
-  if (enableProfilerTimer) {
-    // Don't update "base" render times for bailouts.
-    stopBaseRenderTimerIfRunning();
-  }
-
-  // TODO: We should ideally be able to bail out early if the children have no
-  // more work to do. However, since we don't have a separation of this
-  // Fiber's priority and its children yet - we don't know without doing lots
-  // of the same work we do anyway. Once we have that separation we can just
-  // bail out here if the children has no more work at this priority level.
-  // if (workInProgress.priorityOfChildren <= priorityLevel) {
-  //   // If there are side-effects in these children that have not yet been
-  //   // committed we need to ensure that they get properly transferred up.
-  //   if (current && current.child !== workInProgress.child) {
-  //     reuseChildrenEffects(workInProgress, child);
-  //   }
-  //   return null;
-  // }
-
-  cloneChildFibers(current, workInProgress);
-  return workInProgress.child;
-}
-
-function bailoutOnLowPriority(current, workInProgress) {
-  cancelWorkTimer(workInProgress);
-
-  if (enableProfilerTimer) {
-    // Don't update "base" render times for bailouts.
-    stopBaseRenderTimerIfRunning();
-  }
-
-  // TODO: Handle HostComponent tags here as well and call pushHostContext()?
-  // See PR 8590 discussion for context
-  switch (workInProgress.tag) {
-    case HostRoot:
-      pushHostRootContext(workInProgress);
-      break;
-    case ClassComponent:
-      pushContextProvider(workInProgress);
-      break;
-    case HostPortal:
-      pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
-      break;
-    case ContextProvider:
-      pushProvider(workInProgress);
-      break;
-  }
-  // TODO: What if this is currently in progress?
-  // How can that happen? How is this not being cloned?
-  return null;
-}
-
-// TODO: Delete memoizeProps/State and move to reconcile/bailout instead
-function memoizeProps(workInProgress, nextProps) {
-  workInProgress.memoizedProps = nextProps;
-}
-
-function memoizeState(workInProgress, nextState) {
-  workInProgress.memoizedState = nextState;
-  // Don't reset the updateQueue, in case there are pending updates. Resetting
-  // is handled by processUpdateQueue.
-}
-
-function beginWork(current, workInProgress, renderExpirationTime) {
-  if (enableProfilerTimer) {
-    if (workInProgress.mode & ProfileMode) {
-      markActualRenderTimeStarted(workInProgress);
-    }
-  }
-
-  if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) {
-    return bailoutOnLowPriority(current, workInProgress);
-  }
-
-  switch (workInProgress.tag) {
-    case IndeterminateComponent:
-      return mountIndeterminateComponent(current, workInProgress, renderExpirationTime);
-    case FunctionalComponent:
-      return updateFunctionalComponent(current, workInProgress);
-    case ClassComponent:
-      return updateClassComponent(current, workInProgress, renderExpirationTime);
-    case HostRoot:
-      return updateHostRoot(current, workInProgress, renderExpirationTime);
-    case HostComponent:
-      return updateHostComponent(current, workInProgress, renderExpirationTime);
-    case HostText:
-      return updateHostText(current, workInProgress);
-    case TimeoutComponent:
-      return updateTimeoutComponent(current, workInProgress, renderExpirationTime);
-    case HostPortal:
-      return updatePortalComponent(current, workInProgress, renderExpirationTime);
-    case ForwardRef:
-      return updateForwardRef(current, workInProgress);
-    case Fragment:
-      return updateFragment(current, workInProgress);
-    case Mode:
-      return updateMode(current, workInProgress);
-    case Profiler:
-      return updateProfiler(current, workInProgress);
-    case ContextProvider:
-      return updateContextProvider(current, workInProgress, renderExpirationTime);
-    case ContextConsumer:
-      return updateContextConsumer(current, workInProgress, renderExpirationTime);
-    default:
-      reactProdInvariant('156');
-  }
-}
-
-function markUpdate(workInProgress) {
-  // Tag the fiber with an update effect. This turns a Placement into
-  // a PlacementAndUpdate.
-  workInProgress.effectTag |= Update;
-}
-
-function markRef$1(workInProgress) {
-  workInProgress.effectTag |= Ref;
-}
-
-function appendAllChildren(parent, workInProgress) {
-  // We only have the top Fiber that was created but we need recurse down its
-  // children to find all the terminal nodes.
-  var node = workInProgress.child;
-  while (node !== null) {
-    if (node.tag === HostComponent || node.tag === HostText) {
-      appendInitialChild(parent, node.stateNode);
-    } else if (node.tag === HostPortal) {
-      // If we have a portal child, then we don't want to traverse
-      // down its children. Instead, we'll get insertions from each child in
-      // the portal directly.
-    } else if (node.child !== null) {
-      node.child.return = node;
-      node = node.child;
-      continue;
-    }
-    if (node === workInProgress) {
-      return;
-    }
-    while (node.sibling === null) {
-      if (node.return === null || node.return === workInProgress) {
-        return;
-      }
-      node = node.return;
-    }
-    node.sibling.return = node.return;
-    node = node.sibling;
-  }
-}
-
-var updateHostContainer = void 0;
-var updateHostComponent$1 = void 0;
-var updateHostText$1 = void 0;
-if (supportsMutation) {
-  // Mutation mode
-
-  updateHostContainer = function (workInProgress) {
-    // Noop
-  };
-  updateHostComponent$1 = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance, currentHostContext) {
-    // TODO: Type this specific to this type of component.
-    workInProgress.updateQueue = updatePayload;
-    // If the update payload indicates that there is a change or if there
-    // is a new ref we mark this as an update. All the work is done in commitWork.
-    if (updatePayload) {
-      markUpdate(workInProgress);
-    }
-  };
-  updateHostText$1 = function (current, workInProgress, oldText, newText) {
-    // If the text differs, mark it as an update. All the work in done in commitWork.
-    if (oldText !== newText) {
-      markUpdate(workInProgress);
-    }
-  };
-} else if (supportsPersistence) {
-  // Persistent host tree mode
-
-  // An unfortunate fork of appendAllChildren because we have two different parent types.
-  var appendAllChildrenToContainer = function (containerChildSet, workInProgress) {
-    // We only have the top Fiber that was created but we need recurse down its
-    // children to find all the terminal nodes.
-    var node = workInProgress.child;
-    while (node !== null) {
-      if (node.tag === HostComponent || node.tag === HostText) {
-        appendChildToContainerChildSet(containerChildSet, node.stateNode);
-      } else if (node.tag === HostPortal) {
-        // If we have a portal child, then we don't want to traverse
-        // down its children. Instead, we'll get insertions from each child in
-        // the portal directly.
-      } else if (node.child !== null) {
-        node.child.return = node;
-        node = node.child;
-        continue;
-      }
-      if (node === workInProgress) {
-        return;
-      }
-      while (node.sibling === null) {
-        if (node.return === null || node.return === workInProgress) {
-          return;
-        }
-        node = node.return;
-      }
-      node.sibling.return = node.return;
-      node = node.sibling;
-    }
-  };
-  updateHostContainer = function (workInProgress) {
-    var portalOrRoot = workInProgress.stateNode;
-    var childrenUnchanged = workInProgress.firstEffect === null;
-    if (childrenUnchanged) {
-      // No changes, just reuse the existing instance.
-    } else {
-      var container = portalOrRoot.containerInfo;
-      var newChildSet = createContainerChildSet(container);
-      // If children might have changed, we have to add them all to the set.
-      appendAllChildrenToContainer(newChildSet, workInProgress);
-      portalOrRoot.pendingChildren = newChildSet;
-      // Schedule an update on the container to swap out the container.
-      markUpdate(workInProgress);
-      finalizeContainerChildren(container, newChildSet);
-    }
-  };
-  updateHostComponent$1 = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance, currentHostContext) {
-    // If there are no effects associated with this node, then none of our children had any updates.
-    // This guarantees that we can reuse all of them.
-    var childrenUnchanged = workInProgress.firstEffect === null;
-    var currentInstance = current.stateNode;
-    if (childrenUnchanged && updatePayload === null) {
-      // No changes, just reuse the existing instance.
-      // Note that this might release a previous clone.
-      workInProgress.stateNode = currentInstance;
-    } else {
-      var recyclableInstance = workInProgress.stateNode;
-      var newInstance = cloneInstance(currentInstance, updatePayload, type, oldProps, newProps, workInProgress, childrenUnchanged, recyclableInstance);
-      if (finalizeInitialChildren(newInstance, type, newProps, rootContainerInstance, currentHostContext)) {
-        markUpdate(workInProgress);
-      }
-      workInProgress.stateNode = newInstance;
-      if (childrenUnchanged) {
-        // If there are no other effects in this tree, we need to flag this node as having one.
-        // Even though we're not going to use it for anything.
-        // Otherwise parents won't know that there are new children to propagate upwards.
-        markUpdate(workInProgress);
-      } else {
-        // If children might have changed, we have to add them all to the set.
-        appendAllChildren(newInstance, workInProgress);
-      }
-    }
-  };
-  updateHostText$1 = function (current, workInProgress, oldText, newText) {
-    if (oldText !== newText) {
-      // If the text content differs, we'll create a new text instance for it.
-      var rootContainerInstance = getRootHostContainer();
-      var currentHostContext = getHostContext();
-      workInProgress.stateNode = createTextInstance(newText, rootContainerInstance, currentHostContext, workInProgress);
-      // We'll have to mark it as having an effect, even though we won't use the effect for anything.
-      // This lets the parents know that at least one of their children has changed.
-      markUpdate(workInProgress);
-    }
-  };
-} else {
-  // No host operations
-  updateHostContainer = function (workInProgress) {
-    // Noop
-  };
-  updateHostComponent$1 = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance, currentHostContext) {
-    // Noop
-  };
-  updateHostText$1 = function (current, workInProgress, oldText, newText) {
-    // Noop
-  };
-}
-
-function completeWork(current, workInProgress, renderExpirationTime) {
-  var newProps = workInProgress.pendingProps;
-
-  if (enableProfilerTimer) {
-    if (workInProgress.mode & ProfileMode) {
-      recordElapsedActualRenderTime(workInProgress);
-    }
-  }
-
-  switch (workInProgress.tag) {
-    case FunctionalComponent:
-      return null;
-    case ClassComponent:
-      {
-        // We are leaving this subtree, so pop context if any.
-        popContextProvider(workInProgress);
-        return null;
-      }
-    case HostRoot:
-      {
-        popHostContainer(workInProgress);
-        popTopLevelContextObject(workInProgress);
-        var fiberRoot = workInProgress.stateNode;
-        if (fiberRoot.pendingContext) {
-          fiberRoot.context = fiberRoot.pendingContext;
-          fiberRoot.pendingContext = null;
-        }
-        if (current === null || current.child === null) {
-          // If we hydrated, pop so that we can delete any remaining children
-          // that weren't hydrated.
-          popHydrationState(workInProgress);
-          // This resets the hacky state to fix isMounted before committing.
-          // TODO: Delete this when we delete isMounted and findDOMNode.
-          workInProgress.effectTag &= ~Placement;
-        }
-        updateHostContainer(workInProgress);
-        return null;
-      }
-    case HostComponent:
-      {
-        popHostContext(workInProgress);
-        var rootContainerInstance = getRootHostContainer();
-        var type = workInProgress.type;
-        if (current !== null && workInProgress.stateNode != null) {
-          // If we have an alternate, that means this is an update and we need to
-          // schedule a side-effect to do the updates.
-          var oldProps = current.memoizedProps;
-          // If we get updated because one of our children updated, we don't
-          // have newProps so we'll have to reuse them.
-          // TODO: Split the update API as separate for the props vs. children.
-          // Even better would be if children weren't special cased at all tho.
-          var instance = workInProgress.stateNode;
-          var currentHostContext = getHostContext();
-          // TODO: Experiencing an error where oldProps is null. Suggests a host
-          // component is hitting the resume path. Figure out why. Possibly
-          // related to `hidden`.
-          var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
-
-          updateHostComponent$1(current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance, currentHostContext);
-
-          if (current.ref !== workInProgress.ref) {
-            markRef$1(workInProgress);
-          }
-        } else {
-          if (!newProps) {
-            !(workInProgress.stateNode !== null) ? reactProdInvariant('166') : void 0;
-            // This can happen when we abort work.
-            return null;
-          }
-
-          var _currentHostContext = getHostContext();
-          // TODO: Move createInstance to beginWork and keep it on a context
-          // "stack" as the parent. Then append children as we go in beginWork
-          // or completeWork depending on we want to add then top->down or
-          // bottom->up. Top->down is faster in IE11.
-          var wasHydrated = popHydrationState(workInProgress);
-          if (wasHydrated) {
-            // TODO: Move this and createInstance step into the beginPhase
-            // to consolidate.
-            if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, _currentHostContext)) {
-              // If changes to the hydrated node needs to be applied at the
-              // commit-phase we mark this as such.
-              markUpdate(workInProgress);
-            }
-          } else {
-            var _instance = createInstance(type, newProps, rootContainerInstance, _currentHostContext, workInProgress);
-
-            appendAllChildren(_instance, workInProgress);
-
-            // Certain renderers require commit-time effects for initial mount.
-            // (eg DOM renderer supports auto-focus for certain elements).
-            // Make sure such renderers get scheduled for later work.
-            if (finalizeInitialChildren(_instance, type, newProps, rootContainerInstance, _currentHostContext)) {
-              markUpdate(workInProgress);
-            }
-            workInProgress.stateNode = _instance;
-          }
-
-          if (workInProgress.ref !== null) {
-            // If there is a ref on a host node we need to schedule a callback
-            markRef$1(workInProgress);
-          }
-        }
-        return null;
-      }
-    case HostText:
-      {
-        var newText = newProps;
-        if (current && workInProgress.stateNode != null) {
-          var oldText = current.memoizedProps;
-          // If we have an alternate, that means this is an update and we need
-          // to schedule a side-effect to do the updates.
-          updateHostText$1(current, workInProgress, oldText, newText);
-        } else {
-          if (typeof newText !== 'string') {
-            !(workInProgress.stateNode !== null) ? reactProdInvariant('166') : void 0;
-            // This can happen when we abort work.
-            return null;
-          }
-          var _rootContainerInstance = getRootHostContainer();
-          var _currentHostContext2 = getHostContext();
-          var _wasHydrated = popHydrationState(workInProgress);
-          if (_wasHydrated) {
-            if (prepareToHydrateHostTextInstance(workInProgress)) {
-              markUpdate(workInProgress);
-            }
-          } else {
-            workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext2, workInProgress);
-          }
-        }
-        return null;
-      }
-    case ForwardRef:
-      return null;
-    case TimeoutComponent:
-      return null;
-    case Fragment:
-      return null;
-    case Mode:
-      return null;
-    case Profiler:
-      return null;
-    case HostPortal:
-      popHostContainer(workInProgress);
-      updateHostContainer(workInProgress);
-      return null;
-    case ContextProvider:
-      // Pop provider fiber
-      popProvider(workInProgress);
-      return null;
-    case ContextConsumer:
-      return null;
-    // Error cases
-    case IndeterminateComponent:
-      reactProdInvariant('167');
-    // eslint-disable-next-line no-fallthrough
-    default:
-      reactProdInvariant('156');
-  }
-}
-
-// This module is forked in different environments.
-// By default, return `true` to log errors to the console.
-// Forks can return `false` if this isn't desirable.
-function showErrorDialog(capturedError) {
-  return true;
-}
-
-function logCapturedError(capturedError) {
-  var logError = showErrorDialog(capturedError);
-
-  // Allow injected showErrorDialog() to prevent default console.error logging.
-  // This enables renderers like ReactNative to better manage redbox behavior.
-  if (logError === false) {
-    return;
-  }
-
-  var error = capturedError.error;
-  var suppressLogging = error && error.suppressReactErrorLogging;
-  if (suppressLogging) {
-    return;
-  }
-
-  {
-    // In production, we print the error directly.
-    // This will include the message, the JS stack, and anything the browser wants to show.
-    // We pass the error object instead of custom message so that the browser displays the error natively.
-    console.error(error);
-  }
-}
-
-function logError(boundary, errorInfo) {
-  var source = errorInfo.source;
-  var stack = errorInfo.stack;
-  if (stack === null && source !== null) {
-    stack = getStackAddendumByWorkInProgressFiber(source);
-  }
-
-  var capturedError = {
-    componentName: source !== null ? getComponentName(source) : null,
-    componentStack: stack !== null ? stack : '',
-    error: errorInfo.value,
-    errorBoundary: null,
-    errorBoundaryName: null,
-    errorBoundaryFound: false,
-    willRetry: false
-  };
-
-  if (boundary !== null && boundary.tag === ClassComponent) {
-    capturedError.errorBoundary = boundary.stateNode;
-    capturedError.errorBoundaryName = getComponentName(boundary);
-    capturedError.errorBoundaryFound = true;
-    capturedError.willRetry = true;
-  }
-
-  try {
-    logCapturedError(capturedError);
-  } catch (e) {
-    // Prevent cycle if logCapturedError() throws.
-    // A cycle may still occur if logCapturedError renders a component that throws.
-    var suppressLogging = e && e.suppressReactErrorLogging;
-    if (!suppressLogging) {
-      console.error(e);
-    }
-  }
-}
-
-var callComponentWillUnmountWithTimer = function (current, instance) {
-  startPhaseTimer(current, 'componentWillUnmount');
-  instance.props = current.memoizedProps;
-  instance.state = current.memoizedState;
-  instance.componentWillUnmount();
-  stopPhaseTimer();
-};
-
-// Capture errors so they don't interrupt unmounting.
-function safelyCallComponentWillUnmount(current, instance) {
-  {
-    try {
-      callComponentWillUnmountWithTimer(current, instance);
-    } catch (unmountError) {
-      captureCommitPhaseError(current, unmountError);
-    }
-  }
-}
-
-function safelyDetachRef(current) {
-  var ref = current.ref;
-  if (ref !== null) {
-    if (typeof ref === 'function') {
-      {
-        try {
-          ref(null);
-        } catch (refError) {
-          captureCommitPhaseError(current, refError);
-        }
-      }
-    } else {
-      ref.current = null;
-    }
-  }
-}
-
-function commitBeforeMutationLifeCycles(current, finishedWork) {
-  switch (finishedWork.tag) {
-    case ClassComponent:
-      {
-        if (finishedWork.effectTag & Snapshot) {
-          if (current !== null) {
-            var prevProps = current.memoizedProps;
-            var prevState = current.memoizedState;
-            startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
-            var instance = finishedWork.stateNode;
-            instance.props = finishedWork.memoizedProps;
-            instance.state = finishedWork.memoizedState;
-            var snapshot = instance.getSnapshotBeforeUpdate(prevProps, prevState);
-            instance.__reactInternalSnapshotBeforeUpdate = snapshot;
-            stopPhaseTimer();
-          }
-        }
-        return;
-      }
-    case HostRoot:
-    case HostComponent:
-    case HostText:
-    case HostPortal:
-      // Nothing to do for these component types
-      return;
-    default:
-      {
-        reactProdInvariant('163');
-      }
-  }
-}
-
-function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
-  switch (finishedWork.tag) {
-    case ClassComponent:
-      {
-        var instance = finishedWork.stateNode;
-        if (finishedWork.effectTag & Update) {
-          if (current === null) {
-            startPhaseTimer(finishedWork, 'componentDidMount');
-            instance.props = finishedWork.memoizedProps;
-            instance.state = finishedWork.memoizedState;
-            instance.componentDidMount();
-            stopPhaseTimer();
-          } else {
-            var prevProps = current.memoizedProps;
-            var prevState = current.memoizedState;
-            startPhaseTimer(finishedWork, 'componentDidUpdate');
-            instance.props = finishedWork.memoizedProps;
-            instance.state = finishedWork.memoizedState;
-            instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
-            stopPhaseTimer();
-          }
-        }
-        var updateQueue = finishedWork.updateQueue;
-        if (updateQueue !== null) {
-          instance.props = finishedWork.memoizedProps;
-          instance.state = finishedWork.memoizedState;
-          commitUpdateQueue(finishedWork, updateQueue, instance, committedExpirationTime);
-        }
-        return;
-      }
-    case HostRoot:
-      {
-        var _updateQueue = finishedWork.updateQueue;
-        if (_updateQueue !== null) {
-          var _instance = null;
-          if (finishedWork.child !== null) {
-            switch (finishedWork.child.tag) {
-              case HostComponent:
-                _instance = getPublicInstance(finishedWork.child.stateNode);
-                break;
-              case ClassComponent:
-                _instance = finishedWork.child.stateNode;
-                break;
-            }
-          }
-          commitUpdateQueue(finishedWork, _updateQueue, _instance, committedExpirationTime);
-        }
-        return;
-      }
-    case HostComponent:
-      {
-        var _instance2 = finishedWork.stateNode;
-
-        // Renderers may schedule work to be done after host components are mounted
-        // (eg DOM renderer may schedule auto-focus for inputs and form controls).
-        // These effects should only be committed when components are first mounted,
-        // aka when there is no current/alternate.
-        if (current === null && finishedWork.effectTag & Update) {
-          var type = finishedWork.type;
-          var props = finishedWork.memoizedProps;
-          
-        }
-
-        return;
-      }
-    case HostText:
-      {
-        // We have no life-cycles associated with text.
-        return;
-      }
-    case HostPortal:
-      {
-        // We have no life-cycles associated with portals.
-        return;
-      }
-    case Profiler:
-      {
-        // We have no life-cycles associated with Profiler.
-        return;
-      }
-    case TimeoutComponent:
-      {
-        // We have no life-cycles associated with Timeouts.
-        return;
-      }
-    default:
-      {
-        reactProdInvariant('163');
-      }
-  }
-}
-
-function commitAttachRef(finishedWork) {
-  var ref = finishedWork.ref;
-  if (ref !== null) {
-    var instance = finishedWork.stateNode;
-    var instanceToUse = void 0;
-    switch (finishedWork.tag) {
-      case HostComponent:
-        instanceToUse = getPublicInstance(instance);
-        break;
-      default:
-        instanceToUse = instance;
-    }
-    if (typeof ref === 'function') {
-      ref(instanceToUse);
-    } else {
-      ref.current = instanceToUse;
-    }
-  }
-}
-
-function commitDetachRef(current) {
-  var currentRef = current.ref;
-  if (currentRef !== null) {
-    if (typeof currentRef === 'function') {
-      currentRef(null);
-    } else {
-      currentRef.current = null;
-    }
-  }
-}
-
-// User-originating errors (lifecycles and refs) should not interrupt
-// deletion, so don't let them throw. Host-originating errors should
-// interrupt deletion, so it's okay
-function commitUnmount(current) {
-  if (typeof onCommitUnmount === 'function') {
-    onCommitUnmount(current);
-  }
-
-  switch (current.tag) {
-    case ClassComponent:
-      {
-        safelyDetachRef(current);
-        var instance = current.stateNode;
-        if (typeof instance.componentWillUnmount === 'function') {
-          safelyCallComponentWillUnmount(current, instance);
-        }
-        return;
-      }
-    case HostComponent:
-      {
-        safelyDetachRef(current);
-        return;
-      }
-    case HostPortal:
-      {
-        // TODO: this is recursive.
-        // We are also not using this parent because
-        // the portal will get pushed immediately.
-        if (supportsMutation) {
-          unmountHostComponents(current);
-        } else if (supportsPersistence) {
-          emptyPortalContainer(current);
-        }
-        return;
-      }
-  }
-}
-
-function commitNestedUnmounts(root) {
-  // While we're inside a removed host node we don't want to call
-  // removeChild on the inner nodes because they're removed by the top
-  // call anyway. We also want to call componentWillUnmount on all
-  // composites before this host node is removed from the tree. Therefore
-  var node = root;
-  while (true) {
-    commitUnmount(node);
-    // Visit children because they may contain more composite or host nodes.
-    // Skip portals because commitUnmount() currently visits them recursively.
-    if (node.child !== null && (
-    // If we use mutation we drill down into portals using commitUnmount above.
-    // If we don't use mutation we drill down into portals here instead.
-    !supportsMutation || node.tag !== HostPortal)) {
-      node.child.return = node;
-      node = node.child;
-      continue;
-    }
-    if (node === root) {
-      return;
-    }
-    while (node.sibling === null) {
-      if (node.return === null || node.return === root) {
-        return;
-      }
-      node = node.return;
-    }
-    node.sibling.return = node.return;
-    node = node.sibling;
-  }
-}
-
-function detachFiber(current) {
-  // Cut off the return pointers to disconnect it from the tree. Ideally, we
-  // should clear the child pointer of the parent alternate to let this
-  // get GC:ed but we don't know which for sure which parent is the current
-  // one so we'll settle for GC:ing the subtree of this child. This child
-  // itself will be GC:ed when the parent updates the next time.
-  current.return = null;
-  current.child = null;
-  if (current.alternate) {
-    current.alternate.child = null;
-    current.alternate.return = null;
-  }
-}
-
-function emptyPortalContainer(current) {
-  if (!supportsPersistence) {
-    return;
-  }
-
-  var portal = current.stateNode;
-  var containerInfo = portal.containerInfo;
-
-  var emptyChildSet = createContainerChildSet(containerInfo);
-  replaceContainerChildren(containerInfo, emptyChildSet);
-}
-
-function commitContainer(finishedWork) {
-  if (!supportsPersistence) {
-    return;
-  }
-
-  switch (finishedWork.tag) {
-    case ClassComponent:
-      {
-        return;
-      }
-    case HostComponent:
-      {
-        return;
-      }
-    case HostText:
-      {
-        return;
-      }
-    case HostRoot:
-    case HostPortal:
-      {
-        var portalOrRoot = finishedWork.stateNode;
-        var containerInfo = portalOrRoot.containerInfo,
-            _pendingChildren = portalOrRoot.pendingChildren;
-
-        replaceContainerChildren(containerInfo, _pendingChildren);
-        return;
-      }
-    default:
-      {
-        reactProdInvariant('163');
-      }
-  }
-}
-
-function getHostParentFiber(fiber) {
-  var parent = fiber.return;
-  while (parent !== null) {
-    if (isHostParent(parent)) {
-      return parent;
-    }
-    parent = parent.return;
-  }
-  reactProdInvariant('160');
-}
-
-function isHostParent(fiber) {
-  return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
-}
-
-function getHostSibling(fiber) {
-  // We're going to search forward into the tree until we find a sibling host
-  // node. Unfortunately, if multiple insertions are done in a row we have to
-  // search past them. This leads to exponential search for the next sibling.
-  var node = fiber;
-  siblings: while (true) {
-    // If we didn't find anything, let's try the next sibling.
-    while (node.sibling === null) {
-      if (node.return === null || isHostParent(node.return)) {
-        // If we pop out of the root or hit the parent the fiber we are the
-        // last sibling.
-        return null;
-      }
-      node = node.return;
-    }
-    node.sibling.return = node.return;
-    node = node.sibling;
-    while (node.tag !== HostComponent && node.tag !== HostText) {
-      // If it is not host node and, we might have a host node inside it.
-      // Try to search down until we find one.
-      if (node.effectTag & Placement) {
-        // If we don't have a child, try the siblings instead.
-        continue siblings;
-      }
-      // If we don't have a child, try the siblings instead.
-      // We also skip portals because they are not part of this host tree.
-      if (node.child === null || node.tag === HostPortal) {
-        continue siblings;
-      } else {
-        node.child.return = node;
-        node = node.child;
-      }
-    }
-    // Check if this host node is stable or about to be placed.
-    if (!(node.effectTag & Placement)) {
-      // Found it!
-      return node.stateNode;
-    }
-  }
-}
-
-function commitPlacement(finishedWork) {
-  if (!supportsMutation) {
-    return;
-  }
-
-  // Recursively insert all host nodes into the parent.
-  var parentFiber = getHostParentFiber(finishedWork);
-  var parent = void 0;
-  var isContainer = void 0;
-  switch (parentFiber.tag) {
-    case HostComponent:
-      parent = parentFiber.stateNode;
-      isContainer = false;
-      break;
-    case HostRoot:
-      parent = parentFiber.stateNode.containerInfo;
-      isContainer = true;
-      break;
-    case HostPortal:
-      parent = parentFiber.stateNode.containerInfo;
-      isContainer = true;
-      break;
-    default:
-      reactProdInvariant('161');
-  }
-  if (parentFiber.effectTag & ContentReset) {
-    // Reset the text content of the parent before doing any insertions
-    parentFiber.effectTag &= ~ContentReset;
-  }
-
-  var before = getHostSibling(finishedWork);
-  // We only have the top Fiber that was inserted but we need recurse down its
-  // children to find all the terminal nodes.
-  var node = finishedWork;
-  while (true) {
-    if (node.tag === HostComponent || node.tag === HostText) {
-      if (before) {
-        if (isContainer) {
-          insertInContainerBefore(parent, node.stateNode, before);
-        } else {
-          insertBefore(parent, node.stateNode, before);
-        }
-      } else {
-        if (isContainer) {
-          appendChildToContainer(parent, node.stateNode);
-        } else {
-          appendChild(parent, node.stateNode);
-        }
-      }
-    } else if (node.tag === HostPortal) {
-      // If the insertion itself is a portal, then we don't want to traverse
-      // down its children. Instead, we'll get insertions from each child in
-      // the portal directly.
-    } else if (node.child !== null) {
-      node.child.return = node;
-      node = node.child;
-      continue;
-    }
-    if (node === finishedWork) {
-      return;
-    }
-    while (node.sibling === null) {
-      if (node.return === null || node.return === finishedWork) {
-        return;
-      }
-      node = node.return;
-    }
-    node.sibling.return = node.return;
-    node = node.sibling;
-  }
-}
-
-function unmountHostComponents(current) {
-  // We only have the top Fiber that was inserted but we need recurse down its
-  var node = current;
-
-  // Each iteration, currentParent is populated with node's host parent if not
-  // currentParentIsValid.
-  var currentParentIsValid = false;
-  var currentParent = void 0;
-  var currentParentIsContainer = void 0;
-
-  while (true) {
-    if (!currentParentIsValid) {
-      var parent = node.return;
-      findParent: while (true) {
-        !(parent !== null) ? reactProdInvariant('160') : void 0;
-        switch (parent.tag) {
-          case HostComponent:
-            currentParent = parent.stateNode;
-            currentParentIsContainer = false;
-            break findParent;
-          case HostRoot:
-            currentParent = parent.stateNode.containerInfo;
-            currentParentIsContainer = true;
-            break findParent;
-          case HostPortal:
-            currentParent = parent.stateNode.containerInfo;
-            currentParentIsContainer = true;
-            break findParent;
-        }
-        parent = parent.return;
-      }
-      currentParentIsValid = true;
-    }
-
-    if (node.tag === HostComponent || node.tag === HostText) {
-      commitNestedUnmounts(node);
-      // After all the children have unmounted, it is now safe to remove the
-      // node from the tree.
-      if (currentParentIsContainer) {
-        removeChildFromContainer(currentParent, node.stateNode);
-      } else {
-        removeChild(currentParent, node.stateNode);
-      }
-      // Don't visit children because we already visited them.
-    } else if (node.tag === HostPortal) {
-      // When we go into a portal, it becomes the parent to remove from.
-      // We will reassign it back when we pop the portal on the way up.
-      currentParent = node.stateNode.containerInfo;
-      // Visit children because portals might contain host components.
-      if (node.child !== null) {
-        node.child.return = node;
-        node = node.child;
-        continue;
-      }
-    } else {
-      commitUnmount(node);
-      // Visit children because we may find more host components below.
-      if (node.child !== null) {
-        node.child.return = node;
-        node = node.child;
-        continue;
-      }
-    }
-    if (node === current) {
-      return;
-    }
-    while (node.sibling === null) {
-      if (node.return === null || node.return === current) {
-        return;
-      }
-      node = node.return;
-      if (node.tag === HostPortal) {
-        // When we go out of the portal, we need to restore the parent.
-        // Since we don't keep a stack of them, we will search for it.
-        currentParentIsValid = false;
-      }
-    }
-    node.sibling.return = node.return;
-    node = node.sibling;
-  }
-}
-
-function commitDeletion(current) {
-  if (supportsMutation) {
-    // Recursively delete all host nodes from the parent.
-    // Detach refs and call componentWillUnmount() on the whole subtree.
-    unmountHostComponents(current);
-  } else {
-    // Detach refs and call componentWillUnmount() on the whole subtree.
-    commitNestedUnmounts(current);
-  }
-  detachFiber(current);
-}
-
-function commitWork(current, finishedWork) {
-  if (!supportsMutation) {
-    commitContainer(finishedWork);
-    return;
-  }
-
-  switch (finishedWork.tag) {
-    case ClassComponent:
-      {
-        return;
-      }
-    case HostComponent:
-      {
-        var instance = finishedWork.stateNode;
-        if (instance != null) {
-          // Commit the work prepared earlier.
-          var newProps = finishedWork.memoizedProps;
-          // For hydration we reuse the update path but we treat the oldProps
-          // as the newProps. The updatePayload will contain the real change in
-          // this case.
-          var oldProps = current !== null ? current.memoizedProps : newProps;
-          var type = finishedWork.type;
-          // TODO: Type the updateQueue to be specific to host components.
-          var updatePayload = finishedWork.updateQueue;
-          finishedWork.updateQueue = null;
-          if (updatePayload !== null) {
-            commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork);
-          }
-        }
-        return;
-      }
-    case HostText: