Closed carocad closed 6 years ago
after some though on this, I dont think we should do this.
Given that neither Datascript nor Datomic have had any activity in this direction, I think that it means that most developers are simply taking care of debounce/throtling through external means.
I think that this is the most general solution as a database main point is just storing data not interfacing directly with app code
Right now whenever a components update, it will trigger a re-render due to its usage inside the calling component.
Although this works for most cases, it could create problems if the state is updated very often. A (generic) way to solve this is to allow transducers to be applied to the return value of the r/atom before it is used by the component.
This way it would be possible to do things like
(work/pull! selector eid (map debounce) (remove nil?)