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)?
The router does it. Just look at the macro…it just emits an augmented defsc
Thank you