Skip to content

Instantly share code, notes, and snippets.

View jirehnimes's full-sized avatar
🎯
Focusing

Jireh June Nimes jirehnimes

🎯
Focusing
  • Philippines
View GitHub Profile
@jirehnimes
jirehnimes / vue3-global-registration-of-components.md
Last active September 13, 2023 08:20
vue3-global-registration-of-components.md

How to register your global components dynamically in Vue 3?

components/base/index.ts

import { App } from 'vue';

const requireComponent = require.context(
  // The relative path of the components folder
  './',
 // Whether or not to look in subfolders
@jirehnimes
jirehnimes / blog.md
Created February 4, 2020 09:05 — forked from JacobBennett/blog.md
Clean up your Vue modules with ES6 Arrow Functions

Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.

The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.

<script>

// require vue-resource...

new Vue({