Want this course?
Calculations in Subscriptions
Course: Understanding Re-frame
In this lesson, we learn to move our calculations from our components into Reactive Subscriptions. We don't want to store calculated values in the database, because that would de-normalize the data. We learn how calculated subscriptions are a solution to database de-normalization.
Because Subscriptions and Events form an interface that encapsulates the structure of the Database, the question becomes "what structure should the Database have?" In this lesson, we explore a small evolution of the Database, from a single use case to a completely general solution. The pattern we use is called Indexed Entities.