reflex
reflex copied to clipboard
listHoldWithKey should have an Incremental interface
When using listHoldWithKey it is common to want to trigger updates if only a specific part of the map has changed. The function is currently implemented in terms of Incremental but at the last moment the Incremental is turned into a Dynamic and hence the ability for fine-grained dependencies is lost.
Therefore I propose there is at least one interface which returns an Incremental rather than a Dynamic.
https://github.com/mpickering/reflex/commit/2c1daaa343ef15d83dd0ef6f5cd05c483d28effb#diff-79be6de5c8d4ff0b5d5323dd8976a3d7R64
As another point, it seems confusingly named when listHoldWithKey actually returns a map rather than a list.
Yeah, it's a "list" in the sense of the document you're meant to be thinking about, but that no longer necessarily makes sense now that this function has moved from reflex-dom to reflex. On the point regarding Incremental, I totally agree.