Note: The book has been fully updated as of Aug 2023 to use TypeScript and <script setup> in all the examples!
Preview the contents page and first two chapters for free here: https://app.box.com/s/5lwoe8m6fjt17p6gukp93v5u8qkc8m9b
Vue.js is a great framework - you find yourself building better applications, faster than ever. With Vue 3, things are even better - with the Composition API, TypeScript and <script setup>, you're now feeling unstoppable!
Over time, velocity slows. Business requirements change. The line between business logic and the your UI components begins to blur. Things are not so good anymore.
There is a solution!
Design Patterns for Vue.js will arm you with the tools, patterns and mental framework to build complex, scalable and testable applications.
You'll be learning from my years of experience working on large scale Vue.js applications. I'm also a Vue.js team member and the primary maintaining of Vue Test Utils - there is no better source to learn testing and design patterns from.
- Separation of concerns
- Test-first philosophy
- Renderless functions for maximum re-usability
- Patterns for props and events
- Separating features with composables
- Writing tests to help drive your component design
- Design patterns for consistency
- Options or Composition? Choosing the right API for the job
- Vue and immutability; isolating business logic into stateless, pure functions and wrapping them using the Composition API.
PS: If the price is too high for you, please visit https://lachlan-miller.me/design-patterns-for-vuejs - I offer purchasing power parity for those in lower income countries.
PDF + EPUB direct download, source code (including exercise solutions).