Fork me on GitHub
#fulcro
<
2022-02-21
>
Karol Wójcik06:02:21

I sometimes pass props of the component with the merged ui parameters to a child. In the child component I do declare the query for ui parameters, but for some reason the merged parameters are visible in fulcro$value rather than props. Please Eli5 why?

Karol Wójcik08:02:47

In the other words, I would like to merge ui only data with data fetched from remote.

Jakub Holý (HolyJak)09:02:35

Fulcro props are always stored in Fulcro$value because its cljs data, not js

Jakub Holý (HolyJak)10:02:18

> I would like to merge ui only data with data fetched from remote. > That's what pre-merge can do https://fulcro-community.github.io/guides/tutorial-minimalist-fulcro/index.html#_briefly_about_pre_merge

tony.kay18:02:37

I think you're looking for computed props and the inventions around :ui/ prefixes in the query

tony.kay18:02:48

and pre-merge

Matthew Thompson11:02:41

Hi everyone. I have a question about error handling with Pathom 3 in lenient mode. Component query keys that can't be resolved are returned by Pathom 3 in a map under a :com.wsscode.pathom3.connect.runner/attribute-errors key and merged into the app db. I would like for a component to be able to show a UI message for any errors however, so it seems that I need to add this key to all component queries to get the error out. Is this the proper way to detect errors? As a side note, Fulcro Inspect displays the error keys as values for the keys that are erroring (so if a :foo key in the query can't be resolved, the resulting map shows :foo :com.wsscode.pathom.core/not-found , rather than putting the error in the separate attribute-keys map). This is the behaviour I'd much rather prefer, but only seems to happen inside Fulcro Inspect. Is this the Pathom 2 behaviour, and is there any way I can get this behaviour using Fulcro with Pathom 3?

wilkerlucio13:02:33

to make this, you can add :com.wsscode.pathom3.connect.runner/attribute-errors to your component query, this way you can access it from the component and report the errors

Matthew Thompson14:02:52

Thanks both - I've added the attribute-errors key to my queries and am going to add a bit to the global EQL transform to make sure it doesn't get added to network requests and only queries the app-db.