A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://vuejs.org/api/application below:

Website Navigation


Application API | Vue.js

Application API createApp()

Creates an application instance.

createSSRApp()

Creates an application instance in SSR Hydration mode. Usage is exactly the same as createApp().

app.mount()

Mounts the application instance in a container element.

app.unmount()

Unmounts a mounted application instance, triggering the unmount lifecycle hooks for all components in the application's component tree.

app.onUnmount()

Registers a callback to be called when the app is unmounted.

app.component()

Registers a global component if passing both a name string and a component definition, or retrieves an already registered one if only the name is passed.

app.directive()

Registers a global custom directive if passing both a name string and a directive definition, or retrieves an already registered one if only the name is passed.

app.use()

Installs a plugin.

app.mixin()

Applies a global mixin (scoped to the application). A global mixin applies its included options to every component instance in the application.

Not Recommended

Mixins are supported in Vue 3 mainly for backwards compatibility, due to their widespread use in ecosystem libraries. Use of mixins, especially global mixins, should be avoided in application code.

For logic reuse, prefer Composables instead.

app.provide()

Provide a value that can be injected in all descendant components within the application.

app.runWithContext()

Execute a callback with the current app as injection context.

app.version

Provides the version of Vue that the application was created with. This is useful inside plugins, where you might need conditional logic based on different Vue versions.

app.config

Every application instance exposes a config object that contains the configuration settings for that application. You can modify its properties (documented below) before mounting your application.

js
import { createApp } from 'vue'

const app = createApp(/* ... */)

console.log(app.config)
app.config.errorHandler

Assign a global handler for uncaught errors propagating from within the application.

app.config.warnHandler

Assign a custom handler for runtime warnings from Vue.

app.config.performance

Set this to true to enable component init, compile, render and patch performance tracing in the browser devtool performance/timeline panel. Only works in development mode and in browsers that support the performance.mark API.

app.config.compilerOptions

Configure runtime compiler options. Values set on this object will be passed to the in-browser template compiler and affect every component in the configured app. Note you can also override these options on a per-component basis using the compilerOptions option.

app.config.compilerOptions.isCustomElement

Specifies a check method to recognize native custom elements.

app.config.compilerOptions.whitespace

Adjusts template whitespace handling behavior.

app.config.compilerOptions.delimiters

Adjusts the delimiters used for text interpolation within the template.

app.config.compilerOptions.comments

Adjusts treatment of HTML comments in templates.

app.config.globalProperties

An object that can be used to register global properties that can be accessed on any component instance inside the application.

app.config.optionMergeStrategies

An object for defining merging strategies for custom component options.

app.config.idPrefix

Configure a prefix for all IDs generated via useId() inside this application.

app.config.throwUnhandledErrorInProduction

Force unhandled errors to be thrown in production mode.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4