untangled

NEW CHANNEL: #fulcro
adamvh 2017-06-06T22:08:13.312060Z

how do i do get a df/load-data post-mutation to do a follow-on read?

adamvh 2017-06-06T22:10:10.338886Z

my post-mutation touches a bunch of stuff in the app-state that i'd like to trigger re-renders for, but since the :post-mutation parameter just takes a mutation symbol instead of a query expression i'm not sure how to tell the reconciler what keywords i'm dirtying

adamvh 2017-06-06T22:44:20.759780Z

so, i notice that the solutions in the "putting it together" portion of the dev-guide actually behave the same way - on page refresh, they don't show the data loaded from the server until you trigger a render through the text field's :onChange - i guess this is why df/load is the preferred method?

tony.kay 2017-06-06T23:21:30.160025Z

@claudiu It should be a no-op on the server-side.

tony.kay 2017-06-06T23:23:25.179049Z

@adamvh So, load-data allows for a general query, but once I identified the real needs it was less useful (see the white-board YouTube video): https://youtu.be/mT4jJHf929Q?list=PLVi9lDx-4C_T_gsmBQ_2gztvk6h_Usw6R

tony.kay 2017-06-06T23:24:27.189178Z

load has a :refresh option that can be given the additional keywords to re-render,

adamvh 2017-06-06T23:28:54.233821Z

but if i use load i basically have to send the server my root component's (or some component's) entire query, righty?

tony.kay 2017-06-06T23:29:37.241236Z

you should always be using defui to write your queries, or you don’t get normalization…even with load-data

tony.kay 2017-06-06T23:29:45.242833Z

even if the defui doesn’t have a render

tony.kay 2017-06-06T23:30:21.249513Z

watch the video…it will clear a lot up

tony.kay 2017-06-06T23:31:01.256599Z

it’s too easy to get lost in the weeds of syntax until you understand how to think about the database and loading

adamvh 2017-06-06T23:31:31.261966Z

ah, this is not the whiteboard video i have seen before - ok, i'll have a gander

adamvh 2017-06-06T23:32:10.268547Z

as it stands what i'm having trouble getting past is a perceived super-tight coupling between what my ui data looks like and what i'm sending to the server

tony.kay 2017-06-06T23:32:16.269704Z

short answer: (load :questions Question) means “load something using the made-up root keyword :questions that are of type Question.

adamvh 2017-06-06T23:32:36.272969Z

but i won't bug you anymore until i watch the video

tony.kay 2017-06-06T23:32:41.273794Z

but those questions then get linked into the UI by post mutations etc

tony.kay 2017-06-06T23:32:46.274654Z

yeah, the video will help

tony.kay 2017-06-06T23:33:46.284747Z

That coupling has to be solved (or you have a nightmare of chasing irrelevant threads of UI tree)…Untangled solves it, but you have to think about it from the ident/normalization standpoint. The video should clear it up.

tony.kay 2017-06-06T23:34:27.291456Z

You also want to use InitialAppState to ensure you don’t have to hand-construct (and correct when you refactor) the UI-only tree at app startup.