Skip to main content

Reusable Code

  • Chapter
  • First Online:
Getting to Know Vue.js
  • 2519 Accesses

Abstract

Components are great for reusing an entire custom element, but we can’t use just a portion of the component. To share functionality among multiple components, we have to use mixins. Custom directives will allow us to build out functionality that we can apply to standard HTML components and custom Vue.js components. The render function will give us more control over how our template is built, giving us the ability to use logic in JavaScript to build our templates.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Brett Nelson

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Nelson, B. (2018). Reusable Code. In: Getting to Know Vue.js. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3781-6_9

Download citation

Publish with us

Policies and ethics