Phil Freeman@paf31·Sep 8, 2017A variant on UIs I'd like to try: data UI model = UI { view :: model -> DOM , update :: Δmodel -> model -> ΔDOM }10950
Phil Freeman@paf31·Sep 8, 2017i.e. you have a view function, but also the derivative of the view function. Instead of diffing the virtual dom, you diff the model.2410
Tom Schouten@tom_zwizwaReplying to @paf31It helps to add a model->viewmodel indirection. Then structure viewmodel such that vm diff +- isomorphic to imperative widget toolkit calls.12:40 AM · Sep 9, 2017·Twitter Web Client
Tom Schouten@tom_zwizwa·Sep 9, 2017Replying to @tom_zwizwa and @paf31In my case viewmodel is a nested Erlang map, with diffs expressed in terms of key "paths". Keeps JS code minimal.github.comerl_tools/diff.erl at master · zwizwa/erl_toolsMisc Erlang Tools. Contribute to zwizwa/erl_tools development by creating an account on GitHub.12