Fork me on GitHub
#fulcro
<
2021-02-20
>
Jakub Holý (HolyJak)13:02:42

I would very much appreciate your feedback on a new section called https://github.com/fulcro-community/guides/blob/main/minimalist-fulcro-tutorial/index.adoc#what-to-load , added to the minimalist-fulcro-tutorial to clear a common misconception about the role of load! and Root query. > Even though the Root’s query represents the data needs of the whole UI, you essentially never use it to load! the data from the backend. It does not make sense, as we will see briefly. What you do instead is that you load distinct sub-trees of the data that actually correspond to top-level "entry points" (global Pathom resolvers) in your data model. Remember that you invoke load! with: > ... 🙏

Duck Nebuchadnezzar13:02:42

I wish this page had existed when I was trying to learn all these lessons the hard way.

❤️ 3
Aleksander Rendtslev14:02:19

@U0522TWDA this is amazing! Thank you for putting this together

Jakub Holý (HolyJak)19:02:41

Thank you, it is energizing to hear people truly find it useful.

Jakub Holý (HolyJak)21:02:49

@tony.kay How to troubleshoot "Pick Element" in the Inspect's Element tab? I am on latest Fulcro (gh/develop, just updated) and the Chrome store inspect. I have added the preload as requested and restarted everything. I do not get the alert about missing preload anymore but the picker does not seem to be doing anything. (Well, when activated it turns blue, when I click a piece of UI it turns back to black but I expected the content to show some info about the clicked element but no.)

tony.kay03:02:28

Version of React? The element picker action itself scans the real DOM and React element internals to find what you clicked, so it isn’t very version stable.

Jakub Holý (HolyJak)09:02:18

The one included in fulcro-rad-demo, let me check, maybe I need to update it...

Jakub Holý (HolyJak)10:02:41

Perhaps https://github.com/fulcrologic/fulcro-inspect/blob/master/src/client/fulcro/inspect/ui/element_picker.cljs#L68 is the problem. When I look at the element in chrome dev tools, I see:

goog.object.getKeys(temp1).filter(k => k.startsWith("__react"))
(2) ["__reactFiber$3jzqj8nuzr", "__reactProps$3jzqj8nuzr"]

Jakub Holý (HolyJak)10:02:48

This then works temp1.__reactFiber$3jzqj8nuzr.return.stateNode

Jakub Holý (HolyJak)17:02:35

SOLVED: I was using the wrong version of Fulcro, 3.4.8. The latest one (I tried only 3.4.17) works.