Noticed that there are a lot of people who prefer using simple atoms as a data store for their web apps. I came from the React/Redux land and initially considered this an ok way. But data normalization (and accessing the normalized store) can be not trivial and sometimes has performance drawbacks.
Then I found DataScript, an awesome in-memory database. But having a database is not enough, one also needs some reactive way to watch queries (it’s 2019 year). Turns out it’s also already done in Posh library. It allows you to have “query as atom”, watch it and update your view accordingly (it’s integrated with reagent and rum is on its way).
You can go even deeper and use Re-Posh to use DataScript as your data storage inside re-frame
. Use datalog queries as subscriptions and dispatch transactions instead of regular functions. Re-posh recently got pull-many
support.
So, why not give it a shot?