untangled

NEW CHANNEL: #fulcro
doddenino 2017-01-29T17:08:29.002680Z

Hi! I'm following the exercises in the guide, and right now I'm at the "putting it together" part

doddenino 2017-01-29T17:11:10.002681Z

I uncorrectly assumed from the mutations chapter that by using uc/integrate-ident! I wouldn't have needed to manually add my e.g. new todo both to :todos/by-id and to :list/todos, but in the exercise solution the mutation still has to perform both operations. So, my question is: what's the difference between this (uc/integrate-ident! state new-ident :append [:lists/by-title list :list/items]) and something like this (swap! state update-in [:lists/by-title list :list/items] #(vec (cons new-ident %)))?

doddenino 2017-01-29T17:14:31.002682Z

And then my followup question is: why doesn't uc/integrate-ident! automatically add the todo to :todos/by-id?

tony.kay 2017-01-29T18:02:36.002683Z

Integrate ident is what you said with a few error checks and the ability to do more than one at a time. Just a simplification. Merge is needed to normalize the item itself, so that is a separate (often automatic) step done during net response processing.

doddenino 2017-01-29T18:07:44.002684Z

Mmm I see! It's a lot to learn and some concepts are very new to me 🙂

doddenino 2017-01-29T18:08:01.002685Z

Should I move to the cookbook after the devguide?

tony.kay 2017-01-29T18:34:33.002686Z

The main concepts really are the database format and normalization. Of course, understanding react doesn't hurt. If you get through the entire DevGuide, you're probably in pretty good shape to write an application, and the cookbook will just help you with examples. The getting started video series, and the new untangled in the large video series I'm doing on YouTube are also probably helpful.

doddenino 2017-01-29T18:35:57.002687Z

I'm pretty familiar with react, but I'm a little lost on queries. And also having to put everything together, I think I'm not grasping the full picture yet, there's a lot going on 🙂

tony.kay 2017-01-29T18:37:34.002688Z

I know it feels that way at first, but once you're more familiar with it you'll see there's actually very little going on. That's the beauty of it. The simplifications lead to higher level concepts, but many fewer of them. You might try the getting started videos now rather than later. Seeing it in dynamic action is sometimes helpful.

doddenino 2017-01-29T18:39:13.002689Z

Ok, I'll give them a try! Thanks 🙂

tony.kay 2017-01-29T18:39:36.002690Z

Welcome