Hacker News new | ask | show | jobs
by mayank 2160 days ago
The new Composition API for components is a simpler, more imperative, low-level way of defining components compared to the older Options API that required exporting an object with fields like 'data', 'computed', or 'watch'.

I personally prefer the older API since its more declarative, but I can see how the new API can help to keep reactivity logic in a single function, rather than across computed properties, watchers, etc. (not to mention the annoyance of having to remember what type each property should export -- function returning object? raw object? object with function fields?).