untangled

NEW CHANNEL: #fulcro
claudiu 2017-03-29T06:09:07.536154Z

oh fudge :)… was so focused on initialAppState that I totally forgot about started-callback.

claudiu 2017-03-29T06:09:20.537817Z

@tony.kay thank you

urbank 2017-03-29T12:16:59.820925Z

So I have a union query that chooses between different views (like the tabs), but the views have some table data in common. There can be quite a few of these views. When one of those views adds a new entity to a table that another view in the union is suppose to render as well, is the idea to update all the ident vectors in the other view(s) in the union?

urbank 2017-03-29T12:22:00.886820Z

When view1 adds an 'ent' the ent has to be added to the ent/by-id table as well as all the :ents vectors in different views

urbank 2017-03-29T12:22:25.892516Z

it could also be done when changing view

gardnervickers 2017-03-29T16:35:00.299133Z

@urbank Yes that would be the right approach. Something we do frequently is to have another level of normalization:

{:ents/list-of {:ents/all [[:ent/by-id 1] [:ent/by-id 2]] :ents/some [...]}}

gardnervickers 2017-03-29T16:37:08.343794Z

This approach ends up manifesting on the server side as two different types of endpoints. 1. :ent/list-of which takes an arg for the kind/sorting/filter of list to provide. 2. :ent/by-id which just handles loading by ident.

urbank 2017-03-29T16:50:41.629897Z

@gardnervickers Ok, cool. I suppose another way would be to only update the active view, and update the rest when they become active (through a mutation)

gardnervickers 2017-03-29T16:51:36.649749Z

Sure, that is possible, although seems more difficult to do than just updating them all at once.

tony.kay 2017-03-29T20:04:26.707691Z

@anmonteiro: and I are grabbing lunch in portland. Anyone else?