This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-24
Channels
- # aleph (1)
- # beginners (43)
- # calva (22)
- # cider (51)
- # clerk (1)
- # clj-kondo (20)
- # clojure (29)
- # clojure-denmark (1)
- # clojure-europe (73)
- # clojure-finland (28)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-spec (7)
- # clojure-uk (4)
- # clojurescript (12)
- # data-science (2)
- # datomic (51)
- # events (1)
- # fulcro (20)
- # hyperfiddle (28)
- # integrant (6)
- # malli (20)
- # matrix (2)
- # music (1)
- # off-topic (66)
- # reitit (17)
- # releases (5)
- # ring (1)
- # shadow-cljs (31)
- # xtdb (6)
Flutter/MXers:
Lazy defs
defs are not initialized in order but lazily on a by-need basis. This is a consequence of Dart tree-shaking and fast startup goals.
-- https://github.com/Tensegritics/ClojureDart/blob/main/doc/differences.md#lazy-defsHmmm, found a place I def'ed a widget, in the sandbox x08-navigation
example:
(def second-route
(fx/scaffold
{:appBar (fx/app-bar {:title (fx/text "Second Route")})}
(fx/center
(fx/elevated-button
{:onPressed (fx/in-my-context [me ctx]
(fx/->CBAsIs
(fn ^void []
(fx/ctx-page-pop ctx)
nil)))}
(m/Text "Go back!")))))
Converting to a defn
and then having it called seems to work fine.
A simplifying difference is that second-route
is never offered as a child widget,
:thinking_face: