Fork me on GitHub

I see that fulcro-rad repo has removed yarn.lock and added package-json.lock. What’s the reason for that?


I was having trouble getting it to run tests when that NPM sabotage thing happened last week. Perhaps it would be ok to move back, but I was damn tired of having to do extra maintenance because some immature person decided he didn’t like the reality of his open-source choices.


it affected yarn differently than npm?


I was grasping at straws and NPM had a easier-to-find way to filter recursive deps


Is there a way to use 2 routers in RAD? I have 2 parts on the screen each with independent routing.


Yep. They are designed to compose in arbitrary ways, but the interpretation of HTML5 routing is up to you since the URL can only easily represent one path..but the d.r. ns will be happy to work.


each router is a completely independent actor in the tree. So, add a defsc child that is a target of the parent router, and which has two children, each of which is a defrouter.


Alrighty, so to filter a RAD report using a you pass in, the is to include a control definition even if you don't need a control, and omit the control layout if that is the case. Next, RAD attributes can omit ao/pc-input, thereby making the associated global, while still taking a query parameter. This took me longer to figure out than I would like to admit 😊 Just leaving this here as a reminder to myself, and maybe it will help someone in the future.

❤️ 1

and if you feel like contributing to the book, that’d be great, too


Will do. I'm thinking I'll throw it in 8.1. Handling Report Queries, but maybe a section for common recipes or something would also be helpful.


yeah…does the book mention the control without layout? That is an intentional feature


or pattern, at least


I don't think it does at the moment.


I ctrl+f'd my way through control and layout and didn't spot anything relevant to control without layout. Maybe it's under some other wording.


in I just changed on Root component initial-state from map to lambda and got several error messages,

(defsc Root [this {:root/keys [:router] :as props}]
  {:query         [{:root/router (comp/get-query RootRouter)}]
   :initial-state (fn [_] {:root/router {}})}
   ;:initial-state {:root/router {}}}
core.cljs:159 ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:688] - You are routing to a router whose state was not composed into the app from root. Please check your :initial-state. See 
core.cljs:159 INFO [com.fulcrologic.fulcro.algorithms.indexing:103] - component's ident ([:id nil]) has a `nil` second element. This warning can be safely ignored if that is intended. Props were nil
core.cljs:159 INFO [com.fulcrologic.fulcro.algorithms.indexing:103] - component's ident ([:id nil]) has a `nil` second element. This warning can be safely ignored if that is intended. Props were nil
util.cljs:136 CLJS DevTools: some custom formatters were not rendered.

browser.cljs:20 shadow-cljs: #21 ready!
react_devtools_backend.js:4045 ERROR [com.fulcrologic.fulcro.components:780] - Props passed to are of the type cljs.core/PersistentVector instead of a map. Perhaps you meant to `map` the component over the props? See  
    at div
react_devtools_backend.js:4045 ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:167] - There is a router in state that is missing an ID. This indicates that you forgot to compose it into your initial state! It will fail to operate properly. See 
react_devtools_backend.js:4045 ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:188] - dr/target-ready! was called but there was no router waiting for the target listed:  [:id "a1"] This could mean you sent one ident, and indicated ready on another. See 


Yep. You didn’t do it right…lambda is LITERAL, so you composed an empty map into state. The non-lambda treats and empty map as a call to get-initial-state. See


The latter explains the difference in notation