   [methods]
   (->> (collect [{:view/will-receive-props (fn [this props]
                                              ;; when a component receives new props, update internal state.
-                                             (let [next-props (aget props "props")]
-                                               (vswap! (gobj/get this "re$view") assoc
-                                                       :view/props next-props
-                                                       :view/children (aget props "children"))))
+                                             (let [{prev-props :view/props prev-children :view/children :as this} this]
+                                               (let [next-props (aget props "props")]
+                                                 (vswap! (gobj/get this "re$view")
+                                                         assoc
+                                                         :view/props next-props
+                                                         :view/prev-props prev-props
+                                                         :view/children (aget props "children")
+                                                         :view/prev-children prev-children))))
                   :view/should-update      (fn [{:keys [view/props
                                                         view/prev-props
                                                         view/children

                                                 (d/listen patterns #(force-update this))))
          (vswap! re$view assoc :view/re-db.patterns patterns))
        value))))



(def ^:private kmap
  "Mapping of methods-map keys to React lifecycle keys."

      (fn []
        (this-as this
          (apply f this (:view/children @(gobj/get this "re$view")))))
      (fn [& args]
        (this-as this
          (apply f this args))))))
