re-frame

Casey 2023-10-02T16:21:01.462679Z

I first asked this in #pyramid but I think it's more of a re-frame user question. You can /s/pyramid/datascript/ or doxa or your normalized db of choice.. How are you all using pyramid in frontend apps (perhaps using re-frame) where a component needs some entity, but also that entity's relationships? It seems like all my components have to subscribe to the whole db, so they can get a handle on it to pull out the data they need. Is there a pattern you've find that works well? Like perhaps use pyramid in the rf/reg-sub to yoink out all the needed data on a per-component basis? Or is it better for the views to subscribe to multiple entities in the db?

p-himik 2023-10-02T16:30:09.123299Z

> It seems like all my components have to subscribe to the whole db, so they can get a handle on it to pull out the data they need. Create a sub that receives all the necessary instance-identifying information and retrieves that instance from the db. Then use that sub in all your components.

1
p-himik 2023-10-02T16:30:29.998809Z

Ideally, views should only receive what they need, and nothing else.

➕ 1