My attempt at enabling initializers and finalizers in optic ui. I've thought about it for a long time but unfortunately haven't been able to find a better solution than they way Halogen does it: Adding a unique key to every initializer/finalizer you make, and remember that unique key and the associated property, so you can reuse that one on the next render iteration. I think it's not very nice, but as Halogen is also using it, it seems to be the only way so far.
Please let me know if anything needs changing. I'm not at all fluent in PureScript/Haskell, and I'm open to every tip or remark.
This looks nice; I particularily like the fact that the changes were local to the backend, so the logic of the UI type is not affected. Thank you for your contribution!
My attempt at enabling initializers and finalizers in optic ui. I've thought about it for a long time but unfortunately haven't been able to find a better solution than they way Halogen does it: Adding a unique key to every initializer/finalizer you make, and remember that unique key and the associated property, so you can reuse that one on the next render iteration. I think it's not very nice, but as Halogen is also using it, it seems to be the only way so far.
Please let me know if anything needs changing. I'm not at all fluent in PureScript/Haskell, and I'm open to every tip or remark.
Simon