Composition API (revised from Function-based Component API) – vuejs/rfcs Β· GitHub

github.com

A few days ago, Evan You has published the reworked Function-API RFC. It is now called the Composition API, which fits much better the direction the RFC is taking. The Composition API is a fully additive feature (meaning no breaking changes and NO need to rewrite your existing code), which can be used to improve the way you build your components by being able to extract some of the reusable logic into so called composition functions that can be shared between components or even other composition functions. You can think about them as mixins on steroids without none of the drawbacks. And of course you can mix both the composition API and the typical object-options API that you know from Vue 2.x. πŸŽ‰

The new RFC comes with some additional changes compared to the original one, but it has a detailed documentation page you should definitely read!

Read more...
Linkedin

Want to receive more content like this in your inbox?