Quickstart
Getting started with @nhtio/lucid-resourceful-vue-components is quick and easy. Just follow the steps below and you'll be up and running in no time.
Prerequisites
- Vuetify
- Axios
- An application which uses Lucid Resourceful
Installation
You can install @nhtio/lucid-resourceful-vue-components directly from your preferred package manager
sh
npm i @nhtio/lucid-resourceful-vue-componentssh
pnpm add @nhtio/lucid-resourceful-vue-componentssh
yarn add @nhtio/lucid-resourceful-vue-componentsUsage
Before using the components and utilities provided by @nhtio/lucid-resourceful-vue-components, you will need to boot and attach the IoC Container to the Vue Application.
ts
import { createApp } from 'vue'
import { IoC } from '@nhtio/lucid-resourceful-vue-components'
import { default as App } from './app.vue'
createApp(App).use(IoC).mount('#app')ts
import { defineNuxtPlugin } from 'nuxt/app'
import { IoC } from '@nhtio/lucid-resourceful-vue-components'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(IoC)
})Then components can be easily imported and used as desired:
vue
<script lang="ts" setup>
import { ResourcefulAlerter, ResourcefulIndex, ResourcefulRecord } from "@nhtio/lucid-resourceful-vue-components/components";
const alerter = ref<ResourcefulAlerter | null>(null)
</script>
<template>
<v-app>
<v-main>
<resourceful-index />
<resourceful-record />
<resourceful-alerter ref="alerter" />
</v-main>
</v-app>
</template>Library Contents
In order to faciliate tree-shaking where possible, the library has a barrel-file & specific export structure:
Each module re-exports all of the modules included in it.
For more information and easier navigation, see: