Var, View, Lens, ListModel in UI.Next
Var, View, Lens, ListModel in UI.Next Last week I needed to make a two way binding for a record with nested lists . More precisely, I needed to observe all changes on this record. This changes included normal members but also lists and I needed to observe changes like adding and removing items. It took me a week to come out with a solution where I had to iterate multiple times to get to it. I started with something which was far from ideal then had a conversation on WebSharper forum with Loïc and István and came out with other better solutions. The process was as beneficial as the solution. So today I will take another approach for this blog post and instead of presenting the final solution directly, I will walk you through all the steps I took to finally come up with the solution. And as usual, the code is available on GitHub . Here are the steps: The wrong way - a mutable record - link to code The right way - lensing into members - link to code The optimised way - optimisi