All Projects → blokwise → dynamic

blokwise / dynamic

Licence: MIT license
Load components initialized through @nuxt/components dyamically.

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to dynamic

nuxt-stencil
Easy Stencil.js component library integration with Nuxt.js.
Stars: ✭ 16 (-67.35%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-facebook-pixel-module
Inject Facebook pixel code
Stars: ✭ 82 (+67.35%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-prune-html
🔌⚡ Nuxt module to prune html before sending it to the browser (it removes elements matching CSS selector(s)), useful for boosting performance showing a different HTML for bots/audits by removing all the scripts with dynamic rendering
Stars: ✭ 69 (+40.82%)
Mutual labels:  nuxtjs, nuxt-module
supabase
An easy way to integrate Supabase with NuxtJS
Stars: ✭ 39 (-20.41%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-babel
Use normal .babelrc file with your Nuxt app
Stars: ✭ 32 (-34.69%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-stripejs
💳 NuxtJS module for Stripe.js which loads only when required and w/ retry mechanism
Stars: ✭ 17 (-65.31%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-winston-log
Nuxt module for logging SSR errors using winston
Stars: ✭ 41 (-16.33%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-ghost
Easy Ghost content API integration with Nuxt.js.
Stars: ✭ 27 (-44.9%)
Mutual labels:  nuxtjs, nuxt-module
separate-env-module
Tear your variables apart!
Stars: ✭ 53 (+8.16%)
Mutual labels:  nuxtjs, nuxt-module
date-fns-module
Modern JavaScript date utility library - date-fns for Nuxt.js
Stars: ✭ 68 (+38.78%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-humans-txt
🧑🏻👩🏻 "We are people, not machines" - An initiative to know the creators of a website. Contains the information about humans to the web building - A Nuxt Module to statically integrate and generate a humans.txt author file - Based on the HumansTxt Project.
Stars: ✭ 27 (-44.9%)
Mutual labels:  nuxtjs, nuxt-module
global-components
Module to register global components for Nuxt.js
Stars: ✭ 57 (+16.33%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-rollbar-module
Nuxt.js module for Rollbar
Stars: ✭ 34 (-30.61%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-jsonld
A Nuxt.js module to manage JSON-LD in Vue component.
Stars: ✭ 198 (+304.08%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-modules
AX2's Nuxt modules
Stars: ✭ 30 (-38.78%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-mail
Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.
Stars: ✭ 62 (+26.53%)
Mutual labels:  nuxtjs, nuxt-module
applicationinsights-module
Application Insights module for NuxtJS
Stars: ✭ 14 (-71.43%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-speedkit
nuxt-speedkit will help you to improve the lighthouse performance score (100/100) of your website.
Stars: ✭ 401 (+718.37%)
Mutual labels:  nuxtjs, nuxt-module
yamlful
YAML-based HTTP client code generation
Stars: ✭ 77 (+57.14%)
Mutual labels:  nuxtjs, nuxt-module
nuxt-feature-toggle
The nuxt feature toggle module
Stars: ✭ 78 (+59.18%)
Mutual labels:  nuxtjs, nuxt-module

@blokwise/dynamic

Read the official docs

Installation

Add @blokwise/dynamic dependency to your project:

yarn add @blokwise/dynamic
npm install @blokwise/dynamic

Then, add @blokwise/dynamic to the modules section of nuxt.config.js:

{
  modules: [
    '@blokwise/dynamic'
  ],
}

Props

component

  • Type: String

The name of the component which should be imported. If the component was initialized with a prefix in @nuxt/components config, it should be loaded as such. Nevertheless it is possible to ommit the prefix to automatically detect the right component (if there are no conflincting names).

Heads up: Starting with version v1.4.0 the prop component replaces the deprecated prop name. Passing the component name by using name still works through $attrs.name internally. However, this workaround will be removed in the next major version (v.2.0.0+).

hydration

  • Type: String
  • Default: 'WhenIdle'
  • Options: 'WhenIdle', 'WhenVisible', 'OnInteraction', 'Never'

The hydration prop controls when / how the component will be hydrated. The hydration is implemented with vue-lazy-hydration thanks to Markus Oberlehner.

componentRef

  • Type: String or Number
  • Default: null

The componentRef prop adds a reference to the child component.

Usage

Use dynamic component

The dynamic component will be loaded as NuxtDynamic. The component will be loaded whether you pass the name prefix or not. So in the following case it could load a component called Logo without prefix or a component called BlokwiseLogo which is prefixed with Blokwise according to @nuxt/components configuration of your project / third party libraries.

<template>
  <NuxtDynamic component="Logo" />
</template>

Load the component lazily

The dynamic component can be loaded lazily as LazyNuxtDynamic.

<template>
  <LazyNuxtDynamic component="Logo" />
</template>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].