Replies: 1 comment 3 replies
-
Since I am traveling I will provide a brief answer:
That being said, VanJS doesn't want to force its users to always generate DOM tree based on states. VanJS supports multiple paradigms, and is unopinated on any paradigm. I understand sometimes it's desirable to manipulate DOM tree directly, for performance or for convenience. Speaking out of the context of FE programing, despite the well-known benefits of functional programming, very few people are advocating doing everything in pure functional programming. People naturally understand when is appropriate to do functional programming and when is appropriate to do procedural programming. With regard to FE programing, I believe it's possible to have a UI framework that allows direct DOM manipulation. |
Beta Was this translation helpful? Give feedback.
-
I read a lot about state management and THIS post made me think about the role of state management in an app:
Van.states are conceptually working very close to the DOM. Updating a state object immediately updates the bound DOM elements and event listeners. This is convenient in many cases, but my question is:: Is it enough?
As discribed in the post referenced above, a view is always the result of the current state of an application, and this is influenced by functional logic implemented in the app. But a VIEW is only one aspect, and usually not the most important one. Even further, the application logic should also work without the VIEW.
So, the question is: what role should the VanJS-state play in an app? For a full featured state management, it is possibly missing too many features. If we use any third-party-solution, can this benefit from Van.state?
Beta Was this translation helpful? Give feedback.
All reactions