This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-14
Channels
- # adventofcode (2)
- # announcements (61)
- # babashka (26)
- # beginners (125)
- # calva (63)
- # cider (33)
- # clj-kondo (40)
- # cljs-dev (24)
- # clojure (165)
- # clojure-australia (8)
- # clojure-dev (4)
- # clojure-europe (44)
- # clojure-finland (1)
- # clojure-greece (4)
- # clojure-losangeles (1)
- # clojure-nl (28)
- # clojure-taiwan (3)
- # clojure-uk (64)
- # clojurescript (2)
- # core-async (14)
- # datomic (34)
- # docker (2)
- # fulcro (9)
- # garden (1)
- # jobs (4)
- # jobs-discuss (21)
- # kaocha (3)
- # off-topic (48)
- # pathom (4)
- # practicalli (3)
- # remote-jobs (3)
- # shadow-cljs (46)
- # spacemacs (6)
- # sql (4)
- # tools-deps (22)
- # xtdb (5)
- # yada (2)
Hi, I'm struggling to understand how to compose an *BlockingOverla*y
component and get it's data fed into it. I'm using https://book.fulcrologic.com/#DynamicRouter from the Fulcro book. I would like to replace the javascript alert popup
with `BlockingOverlay` component from https://book.fulcrologic.com/#UIBlocking so in :will-leave
, when the checkbox
is clicked
, instead of calling the alert popup
, I would like to display the `BlockingOverlay` component by setting it's ui/active?
to true. I don't know how to compose the query and get props for the overlay from within `Person` component. I would like to have the overlay
to be visible when :ui/modified?
is true. Hope Since the person component is using deferred loading with no initial state, I can add the ident
for BlockingOverlay
in Person
data tree. Hope I'm making sense 🙂
@tony.kay I feel that there might be a typo here: https://book.fulcrologic.com/#_create_your_project Create a directory and set up a basic node project:
$ mkdir app
$ cd app
$ mkdir -p src/main src/dev resources/public
$ npm init
... answer the questions or just take defaults ...
$ npm install shadow-cljs react react-dom --save
In it mkdir... should be:
mkdir -p src/main/app ...
to account for the namespace of app.client
I was following the document, and ran into the problem. After fix it, then it worked as documented.You still have to make the source file, yes, so adding that addl directory would be convenient for some users. If you’re using IntelliJ it will make that for you. If you’re creating the file by hand, then yes you’ll need that directory. Either way it would be fine to pre-create it.
Is there an example of nested routers to be found somewhere? I'm having trouble getting the child router to initialize, and I'm not sure if I'm missing some crucial component or trick.
@henrik Make sure you compose in initial state and issue a route command that goes all the way to a leaf target.
It is legal to move top-level routes by themselves, only if the children have ever been routed to. Routers are independent composable elements. The initial routing story could certainly be improved, but for the moment at least it is up to you to say a route all the way to a leaf target unless you know it is safe to omit sub-paths (because they’ve already been routed before).
Route issued is full, to the leaf node, and state is composed, at least theoretically.
Should a router get-initial-state
on its route targets, or should the component mounting the router do get-initial-state
for those targets, effectively bypassing the router (in addition to setting up the initial state for the router itself)?