Vue Basics

Vue (pronounced /vjuː/, like view) is a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.

Includes knowledge areas

Vue instance

A Vue instance is essentially a ViewModel as defined in the MVVM pattern. When you instantiate a Vue instance, you need to pass in an options object which can contain options for data, template, element to mount on, methods, lifecycle callbacks and more.

Vue API

How to work with API in VueJS

Vue DOM

The Vue.js team built the virtual DOM to be a kind of abstraction of the traditional DOM; it is a “lite” version of the HTML DOM, but with superpowers. The virtual DOM is smarter, and so it finds a way to be more efficient than the traditional DOM.

Vue Lifecycle Hooks

Lifecycle hooks are the defined methods which get executed in a certain stage of the vue object lifespan. Starting from the initialization, to when it gets destroyed, the object follows different phases of life.

Vue Built-In Components

Built-in components can be used directly in templates without needing to be registered.

Vue Directives

Directives are instructions for VueJS to do things in a certain way.

Dynamic & Async Components

Vue dynamic components enable users to switch between two or more components without routing, and even retain the state of data when switching back to the initial component. As about Async Components - in large applications, we may need to divide the app into smaller chunks and only load a component from the server when it’s needed. To make that easier, Vue allows you to define your component as a factory function that asynchronously resolves your component definition. Vue will only trigger the factory function when the component needs to be rendered and will cache the result for future re-renders.

Component basics (v-model, data, communication, events)

Vue Components are one of the important features of VueJS that creates custom elements, which can be reused in HTML.

Slots

Vue implements a content distribution API, using the <slot> element to serve as distribution outlets for content.

Handling edge cases ($root, $inject, $nextTick, $forceUpdate)

Handling of edge cases, meaning unusual situations that sometimes require bending Vue's rules a little. Note however, that they all have disadvantages or situations where they could be dangerous.

Transitions & Animation

VueJS provides various ways to apply transition to the HTML elements when they are added/updated in the DOM. VueJS has a built-in transition component that needs to be wrapped around the element, which needs transition. Animations are applied the same way as transition is done. Animation also has classes that needs to be declared for the effect to take place.

Reusability & Composition (mixins, plugins, filters)

Different tools provided by Vue that are very helpful while scaling up the application, reusing parts of logic and views across the application.

Reactivity

Reactivity is a programming paradigm that allows us to adjust to changes in a declarative manner.

Is a part of:

Vue.JS

Explore

Heading

HeadingHeading

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.