Skip to content

Commit

Permalink
more stable name for nested props, for better reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrand committed Dec 12, 2024
1 parent 8249243 commit f8ccf12
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions clj/src/cljd/flutter.cljd
Original file line number Diff line number Diff line change
Expand Up @@ -923,10 +923,9 @@
maybe-prop)
env (dissoc env :closest-ctx)
more-forms (cond-> more-forms prop next)
prop (or prop '.child)
widget-name (-> prop name gensym)]
(-> `(let [~widget-name (f/-widget-cont ~env ~@more-forms)]
(~@form ~prop ~widget-name))
prop (or prop '.child)]
(-> `(let [threaded-prop# (f/-widget-cont ~env ~@more-forms)]
(~@form ~prop threaded-prop#))
(with-meta (meta form))))
:else (throw (ex-info (str "Unexpected widget form: " (pr-str form)) {:form form :more-forms more-forms}))))

Expand Down

0 comments on commit f8ccf12

Please sign in to comment.