Philosophies that good functional programmers from the Elm and Clojurescript communities should agree on:
- An application should have a single source of truth -- all your model data in one place.
- Your model data structure should not depend on your interface; a data model should be organized in whatever way is good for the sake of the data, only. View structure != model structure.
- View functions should receive only the data they need for building themselves. Whole model state should not be passed freely everywhere, as this gives most views much more information than they need; this would also make it difficult to build re-usable components, if view functions must also query deeply into a custom data store in addition to performing view logic. Beyond this, it creates a conceptual burden on developers when all views are handling whole model state, you cannot easily follow the flow of data access.
- Related to 3), a view should not inject a data dependency into its parent. That is, all the view nodes/fu