fulcro

tony.kay 2025-12-14T14:43:14.575159Z

Looks like a bug in the warning I guess

Lem Wild 2025-12-14T14:55:37.041039Z

Thanks for replying and letting me know. This gives me piece of mind knowing it's not something wrong with my understanding of how Fulcro works.

Eric Dvorsak 2025-12-15T09:56:50.830419Z

If you don't mind AI answers I think this is a correct explanation: Why Template Notation Shows the Warning The warning comes from Fulcro's component registry check, which tests your initial-state with empty params {}. Template notation with :param/cars: {:person/cars :param/cars} When called with {}, the param doesn't exist, so make-state-map omits the key entirely: {:person/id nil :person/name nil} ;; :person/cars is MISSING Fulcro sees that :person/cars is a join in your query but isn't present in the initial-state result → warning. Lambda notation: (fn [{:keys [cars]}] {:person/cars cars}) When called with {}, you still return the key (just with nil value): {:person/id nil :person/name nil :person/cars nil} ;; key PRESENT All keys exist → no warning. Why Everything Still Works At runtime, when root-elem calls get-initial-state for Person, it passes actual params including :cars. With real params, template notation works fine - the key is included because the param exists. The warning is about static analysis - Fulcro can't know you'll always pass cars at runtime, so it warns you that the component's initial state isn't "complete by default." Best Practice For components that compose children dynamically via params, lambda notation is cleaner because you're explicitly taking responsibility for state composition. Template notation is best when you have static/default children or when children get their own default initial states automatically.