Sutil icon indicating copy to clipboard operation
Sutil copied to clipboard

Could we have a Store.mapStore and Store.mapRStore

Open ImaginaryDevelopment opened this issue 1 year ago • 3 comments

I don't want to imply my design is best for this nor the naming, but I'd love it if something like this was added for child stores that don't redraw controls for unrelated parent properties being changed. If I'm following the behavior I'm seeing correctly even the existing Store.map fires everytime any parent property is changed.

https://github.com/ImaginaryDevelopment/SutilElmishPlay/blob/master/src/App/Adapters/Html.fs#L276

ImaginaryDevelopment avatar Mar 01 '24 15:03 ImaginaryDevelopment

Sorry for the delay in response - let me look into this. Many thanks for the contribution

davedawkins avatar Jul 03 '24 10:07 davedawkins

I'm looking over the example repository to understand the child store issue. Meanwhile, note that we now have mapDistinct with associated operator .>> to filter out update events where the projected value hasn't changed.

davedawkins avatar Jul 03 '24 11:07 davedawkins

do you have example usages of this? I'm trying to figure out if it works for specific properties, or just the high-level store events.

ImaginaryDevelopment avatar Feb 03 '25 16:02 ImaginaryDevelopment