Vue.js

Practical Vue.js articles based on real project cases: component state, lifecycle, drag and drop, Rich Text editors, reusable components, DOM interaction, and complex UI bugs. The focus is on understanding the failure boundary and preventing regressions rather than presenting isolated examples.

why-notification-counters-go-stale-after-returning-to-browser-tab.png
Vue.js

Why Notification Counters Go Stale After Returning to a Browser Tab

In an SPA, an unread notification counter may stay correct while the tab is active and become stale after sleep, a background tab, or browser cache restoration. WebSockets are useful for live updates, but returning to the tab should reconcile state with the server.

49
reset-pagination-on-filter-change-without-triggering-two-requests-cover.png
Vue.js

Reset Pagination on Filter Change Without Triggering Two Requests

When a filter changes, the current page of the previous result set is no longer meaningful. But resetting pageIndex inside a watcher can easily trigger two identical requests. I show how to coordinate both reactions without duplicate loading.

101
vue-rich-text-editor-drag-drop-editable-content-cover.png
Vue.js

Vue Rich Text Editor Drag and Drop: When Block UI Text Became Editable Content

After reordering Content Blocks in a Vue editor, block UI labels could unexpectedly appear inside Rich Text content: locale, position, anchor help, editor labels, and other interface text. This article explores why drag and drop around contenteditable needs stable Vue keys, strict DOM boundaries, correct editor lifecycle handling, and an explicit content synchronization contract.

139