How do you migrate Vue 2 template filters to Vue 3?
Instruction: Explain the Vue 3 removal of filters and provide a computed-property or method replacement with explicit empty/invalid-input behavior.
Context: Tests version-aware Vue migration, reactive derived state, and deterministic display formatting.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
Vue 2 supported template filters such as {{ value | formatValue }}. Vue 3 removed filters. Use a computed property for reactive derived display state or a method when passing arguments. Keep the underlying data separate from its presentation.
This complete Vue 3 single-file component displays a date in a...