TRADEOFF BATTLE
watch vs watchEffect for Vue reactive side effects
A Vue feature triggers side effects from several reactive inputs and needs cleanup for stale work. Would you use watch or watchEffect?
The prompt
You are building a Vue 3 pricing configurator. The page has a selected plan, billing interval, seat count, region, and an optional coupon field. Whenever the currently relevant inputs change, the app should fetch a fresh quote preview and cancel the previous request if a newer change arrives first. Some dependencies are conditional: the coupon only matters when the coupon section is enabled, and some enterprise-only options only matter when the user picks the enterprise plan. In the interview, the panel asks whether you would model this effect with an explicit `watch(...)` or with `watchEffect(...)`.
Pick the direction you would defend
You are not looking for the universal winner. You are picking the strongest answer for this prompt.
Commit to a direction
Pick the option you would defend, then reveal the stronger interview framing for this prompt.