Fork me on GitHub
#fulcro
<
2018-01-12
>
macrobartfast02:01:35

I'm following the 2nd video, and for some reason I'm not getting the :ui/react-key key value when :inspect-data is set to true, just the :name and :ui/locale... any thoughts?

tony.kay04:01:57

@macrobartfast 2.1+ doesn't use it anymore

tony.kay04:01:02

I reworked the rendering to not need it. It was originally a workaround for the fact that there was no way to do a global re-render of an app in Om Next

tony.kay04:01:38

I still need to update docs and I'm not sure what to do about the videos...probably just put a comment in the description.

tony.kay04:01:20

oh, but perhaps I need to fix the defcard-fulcro macro...it may not have been updated to use the new stuff

macrobartfast06:01:10

great... thanks for that info... I don't think it's a show stopper for anyone watching the videos for now; they'll probably cruise past it.

tony.kay06:01:35

it all looks ok to me in code. nothing should be broken. Let me know if something doesn’t actually work

levitanong07:01:48

@tony.kay I’ve found that there is no need for the post-mutation when the marker is set to false. Perhaps the behavior has changed since the first time this was written? http://book.fulcrologic.com/#_the_ui_and_post_mutation

tony.kay08:01:30

That may be true..I’d have to re-visit the example code to know…glancing at it I don’t remember

nickowsy16:01:26

Question about UI Refresh. I have a component that runs a transact! The defmuation only includes

(action [{:keys [state]}] .. )
and I'm seeing only the component refresh. However, if I add a remote to the mutation, I'm seeing the entire tree to that component rerender.

nickowsy16:01:13

Is there a way to avoid the entire tree from refreshing when I include the 'remote' call?

tony.kay18:01:09

Hey @nickowsy. That sounds potentially like a bug in rendering optimization, but it isn't technically a bug in the model, since you should be thinking of the rendering as if it were a frame-based animation of the entire screen. Load markers also queue refreshes, and you might be using the old-style load markers and querying for those elsewhere?

tony.kay18:01:26

What's the specific issue you have with a full refresh?

nickowsy18:01:37

hey @tony.kay! we have a defui w/ a recursive query. After the remote mutation, the top level component's props includes a change to 1 of it's children. That child was updated during the action part of the mutation. However, the top level component re-renders causing re-rendering all it's children. On the re-rending of all the children, user input which hasn't be transacted yet gets blanked out.

tony.kay19:01:29

Ah, I see...but it gets blanked out because you're using component-local state I'm guessing

tony.kay19:01:06

or uncontrolled components?

tony.kay19:01:42

if that's a case, then it could be a bug

tony.kay19:01:06

which version of Fulcro?

nickowsy19:01:27

we are using 2.0.0-beta5

tony.kay19:01:53

where is your form state held that is getting blanked?

nickowsy19:01:51

we do transact inputs on-change and not use local-state

tony.kay19:01:16

then something getting blanked must be a model problem...you're overwriting state

tony.kay19:01:43

refresh from root would be an unnoticeable op otherwise

tony.kay19:01:43

if you were using component-local state and :ui/react-key then there could have been a bug...umount/mount of components loses local state, but that's fixed in 2.1+

tony.kay19:01:07

(both you don't need a react-key, and refresh works differently)

nickowsy19:01:13

cool thanks, I'll dig in more and see about overwriting state

tony.kay19:01:35

@nickowsy have you tried fulcro-inspect yet?

nickowsy19:01:31

ah, i haven't I'll give it a try

nickowsy19:01:40

we are storing most things in the db

tony.kay19:01:48

you should. It is easy, and it makes these kinds of problems so much easier to diagnose

nickowsy19:01:56

so i'm sure it would help

tony.kay19:01:14

yeah, you can see how your database changes over time...and even scan that history with a slider