Jennifer Bland header image
≡ Menu

Vue 3 Composition API vs Options API

The Composition API is a new feature in Vue.js 3 that provides a different way to define the logic of a Vue component. It allows you to use a functional style of programming and to reuse logic across multiple components.

The Options API, on the other hand, is the traditional way of defining the logic of a Vue component. It uses an object-oriented style of programming and requires you to specify the logic of a component in the options object of the Vue constructor.

Benefits of Composition API

One of the main benefits of the Composition API is that it allows you to extract and reuse logic across multiple components. This can make your code more modular and easier to maintain. In contrast, the Options API requires you to define all the logic of a component in a single object, which can make it more difficult to reuse logic across multiple components.

[continue reading…]

The @Vue/CLI Tutorial

Vue CLI is a full system for rapid Vue.js development. It provides the following:

  • Interactive project scaffolding via @vue/cli.
  • A runtime dependency (@vue/cli-service) that is:
    • Upgradeable;
    • Built on top of webpack, with sensible defaults;
    • Configurable via in-project config file;
    • Extensible via plugins
  • A rich collection of official plugins integrating the best tools in the frontend ecosystem.
  • A full graphical user interface to create and manage Vue.js projects.

[continue reading…]

Storage vs Memory vs Calldata – Understanding Data Locations in Solidity

Solidity provides value types and reference types. Reference types are arrays, mappings, and structs. Value types are all other data types like string, int, and boolean. When you define a reference type you have to define the "data location" to determine where the data is stored. The three data locations are memory, storage and calldata. In this article, I will be explaining the difference between them.

[continue reading…]

Going, Going, Gone … How Terra Luna Lost 99.8% of it’s value in 4 days

Luna reached an an all time high of $116 last month. Today it is worth $0.00512478. Once a top 10 most valuable crypto coin, Luna shut down its network today effectively ending the project.

The coin lost 98% of its value in a span of 24 hours. During this timeframe the crypto market saw a loss of $40 billion dollars. If you had invested $10,000 in Luna 7 days ago, at the time of publishing your holdings would be worth $0.62. How did this happen? What went wrong?

[continue reading…]

How to Titleize a Sentence in JavaScript

We recently ran into a scenario at work where we went through the process to redo all the email templates used in our application. There were over 300+ templates that we redesigned. After we finished somebody requested that we change the subject line to be title-cased like you would in a print headline. Not wanting to manually change all 300+ templates, I wrote this quick function that handled the process automatically.

What is Title Case

At first glance, it might sound like we wanted the first letter of every word in a subject line to be uppercase and the remainder of the word to be lowercase.

Well, that is almost correct. We don't want certain words to be capitalized. Words like a, an or and we wanted to remain lowercase.

[continue reading…]