Understand the difference between Imperative and Declarative UI frameworks
UI frameworks are generally categorized as either Imperative or Declarative.
Imperative Frameworks (e.g., jQuery) focus on the process. The developer explicitly describes every step required to achieve a result, creating a one-to-one mapping between the logical steps and the code.
Declarative Frameworks (e.g., Vue) focus on the result. The developer describes what the final state should look like, and the framework handles the underlying process of achieving that state. While the internal implementation of a declarative framework is imperative, the API exposed to the user is declarative.
// Imperative approach (jQuery): Focuses on the process
$('#app')
.text('Hello World')
.on('click', () => alert('ok'))
// Declarative approach (Vue): Focuses on the result
<div id='app' @click=() => alert('ok')>hello World</div>