4 ms·
That's interesting. Admittedly, I've not done UI work for many years and I've never used FP for UI development. But what you described is really the way we used
by 0x445442 8y ago
That's interesting. Admittedly, I've not done UI work for many years and I've never used FP for UI development. But what you described is really the way we used to design things with OOP. You'd have classes which represented physical views and would register for events on an event bus. When the events arrived the views would update themselves accordingly.
- yogthos 8y agoThe biggest difference is in how the state is managed. With OOP, each class is typically its own state machine with its internal behavior. With the FP approach, you can treat your state like a database, and you can easily inspect the overall state of the application. There is some nice tooling for doing these kinds of inspections in re-frame nowadays https://github.com/Day8/re-frame-10x https://github.com/Day8/re-frame-10x