# vuejs

Published articles for vuejs.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Update State Management with Pinia

DevFeed: [Update State Management with Pinia](<https://devfeed.tech/articles/update-state-management-with-pinia-23902.md>)

Original publisher: [Read original article](<https://medium.com/smg-real-estate/update-state-management-with-pinia-0d856a417535?source=rss----2186e5b9bd8f---4>)

Author: Dusko Peric

Published: 2024-03-21T14:43:21Z

Content type: article

Language: en

Sources: [Homegate Engineering Blog - Medium](<https://devfeed.tech/sources/homegate-engineering-blog-medium.md>)

Topics: [Vue.js](<https://devfeed.tech/topics/vue.md>), [Development](<https://devfeed.tech/topics/development.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [developer-experience](<https://devfeed.tech/tags/developer-experience.md>), [development](<https://devfeed.tech/tags/development.md>), [pinia](<https://devfeed.tech/tags/pinia.md>), [state-management](<https://devfeed.tech/tags/state-management.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [vue-js](<https://devfeed.tech/tags/vue-js.md>), [vuejs](<https://devfeed.tech/tags/vuejs.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>)

### AI overview

This article explains Pinia as a state-management option for Vue.js applications. It describes Pinia's component-like store structure, direct state updates within actions instead of mutations, modular stores, Option and Setup Stores, TypeScript support, Vue Devtools support, and its lightweight design.

### Source excerpt

In the development and maintenance of web applications, one of the crucial factors is the proper choice of state management. When it comes to Vue.js, we have two players in the game, where in my opinion, we have a clear winner. In this article, I will go through the functionalities brought by Pinia, which represent a step forward in this field. Intuitive API One of the problems in working with state is that it can very easily become confusing and complex. With its component-like structure, Pinia allows for easier understanding of how the store functions and interacts with your application. Let's look at an example to compare a Vue component with a Pinia store. Syntax similarity between Vue component and Pinia store This familiar syntax makes it a user-friendly and efficient solution for managing state. Excluding Mutations One of the key differences between Pinia and Vuex lies in the absence of mutations. In Vuex, the distinction between actions and mutations can become less clear-cut, particularly for complex stores. This redundancy can lead to repetitive code, adding unnecessary complexity to state management. Pinia takes a more direct approach. You can simply modify the state directly within actions. Let's see a code example to illustrate this concept: Vuex Store import { createStore } from 'vuex'; export default createStore({ state: { count: 0, }, mutations: { increment(state) { state.count++; // Update state through mutation }, }, actions: { increment({ commit }) { commit('increment'); // Dispatch mutation to update state }, }, }); Pinia Store import { defineStore } from 'pinia'; export const useCounterStore = defineStore('counter', { state: () => ({ count: 0, }), actions: { increment() { this.count++; // Directly update state within action }, }, }); In essence, Pinia removes an unnecessary layer of complexity by allowing direct state updates within actions. Modular stores design Pinia allow you to create multiple stores for different parts of your application,

## Vue.js Advanced Reactivity API and Caching Method-style Getters

DevFeed: [Vue.js Advanced Reactivity API and Caching Method-style Getters](<https://devfeed.tech/articles/vue-js-advanced-reactivity-api-and-caching-method-style-getters-35104.md>)

Original publisher: [Read original article](<https://engineroom.teamwork.com/vue-js-advanced-reactivity-api-and-caching-method-style-getters-a80979b6660?source=rss----cea4eecd5960---4>)

Author: Michael Gallagher

Published: 2019-07-11T11:48:14Z

Content type: tutorial

Language: en

Sources: [Teamwork](<https://devfeed.tech/sources/teamwork.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [Vue.js](<https://devfeed.tech/topics/vue.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [advanced](<https://devfeed.tech/tags/advanced.md>), [caching](<https://devfeed.tech/tags/caching.md>), [code](<https://devfeed.tech/tags/code.md>), [front-end-development](<https://devfeed.tech/tags/front-end-development.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [performance](<https://devfeed.tech/tags/performance.md>), [vue](<https://devfeed.tech/tags/vue.md>), [vue-js](<https://devfeed.tech/tags/vue-js.md>), [vuejs](<https://devfeed.tech/tags/vuejs.md>), [vuex](<https://devfeed.tech/tags/vuex.md>)

### AI overview

This tutorial explains why Vuex method-style getter invocations do not cache their returned values, distinguishes that behavior from property-style getter caching, and discusses how to implement result caching when performance measurements justify it. It also relates the approach to Vue's Advanced Reactivity API and method-style computed properties.

### Source excerpt

We're going to talk about a common request when working with relational data in Vuex. Why and how to cache method-style getter invocations, though the principles would also apply to method-style computed properties. If you have been following recent Vue v3 RFCs, you might have come across the Advanced Reactivity API, which comes as a very welcome direction for Vue to take. This article is written using Vue v2, but ultimately the code will be simplified if this RFC is implemented. Firstly, although both property-style and method-style getters offer caching as part of core Vuex functionality, method-style getter invocations do not cache results. If that doesn't make much sense, keep reading, it should become clear. What is a Method-style Getter? Below is the example from the Vuex documentation of a method-style getter, sometimes referred to as a parameterized getter. getTodoById: (state) => (id) => { return state.todos.find(todo => todo.id === id) } Normally a getter works by processing state into a given result. todoCount: (state) => state.todos.length, This will mean that store.getters.todoCount might provide the value 12, which will be cached in the event that the value is accessed again without any underlying reactive data changing. isTodoOpen: (state) => (id) => !!state.todos[id].assignee && state.todos[id].status !== 'complete', The above example can be accessed by store.getters.isTodoOpen(123) which will return a boolean. This value is not cached, calling it repeatedly will result in multiple executions. So what is cached here? Nothing from a reactive standpoint. When the getter property is accessed on the store, store.getters.isTodoOpen, just prior to invocation, this will run the outer function which will not access any reactive data, but create a function, an arrow which accepts id. This created function is now cached. Why aren't the results of these getters cached? There are lots of good reasons not to cache the results of these functions. How many times wo

## Using VueJS + GraphQL to make Practical Magic

DevFeed: [Using VueJS + GraphQL to make Practical Magic](<https://devfeed.tech/articles/using-vuejs-graphql-to-make-practical-magic-31320.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/using-vuejs-graphql-to-make-practical-magic>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2018-08-27T22:29:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [vuejs](<https://devfeed.tech/topics/vuejs.md>), [Content Management System](<https://devfeed.tech/topics/cms.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [axios](<https://devfeed.tech/topics/axios.md>), [Bootstrap](<https://devfeed.tech/topics/bootstrap.md>), [Jamstack](<https://devfeed.tech/topics/jamstack.md>)

Tags: [auto-complete](<https://devfeed.tech/tags/auto-complete.md>), [axios](<https://devfeed.tech/tags/axios.md>), [bootstrap](<https://devfeed.tech/tags/bootstrap.md>), [craft](<https://devfeed.tech/tags/craft.md>), [everyday](<https://devfeed.tech/tags/everyday.md>), [form](<https://devfeed.tech/tags/form.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [headless](<https://devfeed.tech/tags/headless.md>), [insights](<https://devfeed.tech/tags/insights.md>), [jamstack](<https://devfeed.tech/tags/jamstack.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [like](<https://devfeed.tech/tags/like.md>), [magic](<https://devfeed.tech/tags/magic.md>), [practical](<https://devfeed.tech/tags/practical.md>), [problems](<https://devfeed.tech/tags/problems.md>), [saving](<https://devfeed.tech/tags/saving.md>), [searching](<https://devfeed.tech/tags/searching.md>), [solve](<https://devfeed.tech/tags/solve.md>), [submission](<https://devfeed.tech/tags/submission.md>), [using](<https://devfeed.tech/tags/using.md>), [vuejs](<https://devfeed.tech/tags/vuejs.md>)

### AI overview

A practical tutorial showing how to use VueJS and GraphQL with a headless Craft CMS backend to implement auto-complete search and save contact-form submissions. It introduces the frontend and backend tooling used in the examples, including Axios, Bootstrap 4, Craft CMS, and CraftQL.

### Source excerpt

Make some practical magic with VueJS + GraphQL to solve everyday problems like auto-complete searching and form submission saving with a headless Craft CMS server

## Post-Mortem: LinkedIn Talent Intelligence Experience

DevFeed: [Post-Mortem: LinkedIn Talent Intelligence Experience](<https://devfeed.tech/articles/post-mortem-linkedin-talent-intelligence-experience-31287.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/post-mortem-linkedin-talent-intelligence-experience>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2018-06-20T13:37:00Z

Content type: article

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Post Mortem](<https://devfeed.tech/topics/post-mortem.md>), [Content Management System](<https://devfeed.tech/topics/cms.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>), [vuejs](<https://devfeed.tech/topics/vuejs.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [App](<https://devfeed.tech/topics/app.md>), [DevOps](<https://devfeed.tech/topics/devops.md>)

Tags: [app](<https://devfeed.tech/tags/app.md>), [cms](<https://devfeed.tech/tags/cms.md>), [covers](<https://devfeed.tech/tags/covers.md>), [craft](<https://devfeed.tech/tags/craft.md>), [create](<https://devfeed.tech/tags/create.md>), [devops](<https://devfeed.tech/tags/devops.md>), [experience](<https://devfeed.tech/tags/experience.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [intelligence](<https://devfeed.tech/tags/intelligence.md>), [interactive](<https://devfeed.tech/tags/interactive.md>), [linkedin-s](<https://devfeed.tech/tags/linkedin-s.md>), [post-mortem](<https://devfeed.tech/tags/post-mortem.md>), [post-mortems](<https://devfeed.tech/tags/post-mortems.md>), [project](<https://devfeed.tech/tags/project.md>), [talent](<https://devfeed.tech/tags/talent.md>), [unique](<https://devfeed.tech/tags/unique.md>), [vuejs](<https://devfeed.tech/tags/vuejs.md>), [web](<https://devfeed.tech/tags/web.md>)

### AI overview

This post-mortem explains how Craft CMS 3, GraphQL, and VueJS were used to build an interactive tablet-and-projection-wall experience for LinkedIn's Talent Intelligence events. It focuses on the project's planning, architecture, DevOps, and core application design.

### Source excerpt

This project post-mortem covers a unique use of Craft CMS 3, GraphQL, and VueJS to create an interactive experience for LinkedIn's Talent Intelligence Experience

## Embedding Teamwork Chat

DevFeed: [Embedding Teamwork Chat](<https://devfeed.tech/articles/embedding-teamwork-chat-35097.md>)

Original publisher: [Read original article](<https://engineroom.teamwork.com/embedding-teamwork-chat-7a6910a3d535?source=rss----cea4eecd5960---4>)

Author: Dawid Myslak

Published: 2017-10-23T15:52:56Z

Content type: article

Language: en

Sources: [Teamwork](<https://devfeed.tech/sources/teamwork.md>)

Topics: [Vue.js](<https://devfeed.tech/topics/vue.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Webpack](<https://devfeed.tech/topics/webpack.md>), [Development](<https://devfeed.tech/topics/development.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Library](<https://devfeed.tech/topics/library.md>), [flux](<https://devfeed.tech/topics/flux.md>), [ESLint](<https://devfeed.tech/topics/eslint.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [chat](<https://devfeed.tech/tags/chat.md>), [development](<https://devfeed.tech/tags/development.md>), [eslint](<https://devfeed.tech/tags/eslint.md>), [flux](<https://devfeed.tech/tags/flux.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [vuejs](<https://devfeed.tech/tags/vuejs.md>), [vuex](<https://devfeed.tech/tags/vuex.md>), [webpack](<https://devfeed.tech/tags/webpack.md>)

### AI overview

The article describes how Teamwork.com embedded Teamwork Chat Project Rooms directly in Teamwork Projects. The team chose a new component-based implementation and used Vue.js, Vuex, Webpack, modern JavaScript, ESLint, and reusable Node.js modules while considering performance.

### Source excerpt

A couple of weeks ago we introduced a new feature in Teamwork Chat called Project Rooms. Project Rooms are a great way to create dedicated real-time communication channels for specific projects. Our next priority was to take this feature even further. Project Rooms in Teamwork Chat.Embedded Teamwork Chat Currently Project Rooms can be used inside Teamwork Chat, but our goal was to make them accessible directly in Teamwork Projects. To achieve this, we considered the following two options: Decouple only the important bits and pieces from the existing codebase of Teamwork Chat and deliver them as a standalone module. Create a brand new solution that follows component based architecture which could potentially be the future core codebase for the next generation of Teamwork Chat. After looking into this for a while, we decided that the second option will let us deliver a better quality solution. Our main concern with decoupling the existing codebase was the fact that we didn't use a component based architecture in the existing client. Unfortunately at the time of the initial implementation of the app, Knockout.js components weren't a common choice. New tech stack Earlier this year at Teamwork.com we made the decision that all our development teams will start using Vue.js as the main front-end framework. We also started working on creating a new internal build system based on Webpack, which allows us to use the latest front-end tools and makes the development process significantly more productive. Together with Vue.js we started using Vuex, which is a state management library inspired by Flux architecture. Another big change for us was dropping CoffeeScript and replacing it with the next generation of JavaScript. JavaScript ES2015+ comes with great new features and syntax, but also offers incredible editor support and great ESLint that makes our code more consistent across the team. New technology stack for embedded Teamwork Chat. Luckily, during the development of an ex

## Autocomplete Search with the Element API & VueJS

DevFeed: [Autocomplete Search with the Element API & VueJS](<https://devfeed.tech/articles/autocomplete-search-with-the-element-api-vuejs-31245.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/autocomplete-search-with-the-element-api-vuejs>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2017-02-22T06:19:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Vue.js](<https://devfeed.tech/topics/vue.md>), [Content Management System](<https://devfeed.tech/topics/cms.md>), [API](<https://devfeed.tech/topics/api.md>), [Ajax](<https://devfeed.tech/topics/ajax.md>), [JSON](<https://devfeed.tech/topics/json.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [autocomplete](<https://devfeed.tech/tags/autocomplete.md>), [cms](<https://devfeed.tech/tags/cms.md>), [cmss](<https://devfeed.tech/tags/cmss.md>), [craft](<https://devfeed.tech/tags/craft.md>), [create](<https://devfeed.tech/tags/create.md>), [element](<https://devfeed.tech/tags/element.md>), [fast](<https://devfeed.tech/tags/fast.md>), [feature](<https://devfeed.tech/tags/feature.md>), [functional](<https://devfeed.tech/tags/functional.md>), [github](<https://devfeed.tech/tags/github.md>), [heres](<https://devfeed.tech/tags/heres.md>), [insights](<https://devfeed.tech/tags/insights.md>), [json](<https://devfeed.tech/tags/json.md>), [npm](<https://devfeed.tech/tags/npm.md>), [search](<https://devfeed.tech/tags/search.md>), [vuejs](<https://devfeed.tech/tags/vuejs.md>)

### AI overview

A tutorial on using Craft CMS's Element API and VueJS to build an autocomplete search feature for blog entries. The Vue component sends AJAX requests to the Element API, receives JSON results, and renders them in a navigable dropdown.

### Source excerpt

Here's how to use Craft CMS's Element API and VueJS to create a fast, functional autocomplete search feature

## Lazy Loading with the Element API & VueJS

DevFeed: [Lazy Loading with the Element API & VueJS](<https://devfeed.tech/articles/lazy-loading-with-the-element-api-vuejs-31276.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/lazy-loading-with-the-element-api-vuejs>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2016-12-17T17:45:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [lazy loading](<https://devfeed.tech/topics/lazy-loading.md>), [Content Management System](<https://devfeed.tech/topics/cms.md>), [vuejs](<https://devfeed.tech/topics/vuejs.md>), [API](<https://devfeed.tech/topics/api.md>), [Front end](<https://devfeed.tech/topics/frontend.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [cms](<https://devfeed.tech/tags/cms.md>), [cms-s](<https://devfeed.tech/tags/cms-s.md>), [content](<https://devfeed.tech/tags/content.md>), [craft](<https://devfeed.tech/tags/craft.md>), [display](<https://devfeed.tech/tags/display.md>), [element](<https://devfeed.tech/tags/element.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [here-s](<https://devfeed.tech/tags/here-s.md>), [insights](<https://devfeed.tech/tags/insights.md>), [lazy](<https://devfeed.tech/tags/lazy.md>), [lazy-loading](<https://devfeed.tech/tags/lazy-loading.md>), [load](<https://devfeed.tech/tags/load.md>), [vuejs](<https://devfeed.tech/tags/vuejs.md>)

### AI overview

A tutorial on using Craft CMS's Element API with VueJS to lazy-load additional blog entries and display them on a frontend. It explains how to create an API endpoint that returns paginated blog content, including titles, URLs, summaries, images, categories, and tags.

### Source excerpt

Here's how to use Craft CMS's Element API to lazy load content and display it via VueJS on the frontend

## Using VueJS 2.0 with Craft CMS

DevFeed: [Using VueJS 2.0 with Craft CMS](<https://devfeed.tech/articles/using-vuejs-2-0-with-craft-cms-31319.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/using-vuejs-2-0-with-craft-cms>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2016-12-09T20:12:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Vue.js](<https://devfeed.tech/topics/vue.md>), [Content Management System](<https://devfeed.tech/topics/cms.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [jQuery](<https://devfeed.tech/topics/jquery.md>), [Document Object Model (DOM)](<https://devfeed.tech/topics/dom.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [building](<https://devfeed.tech/tags/building.md>), [cms](<https://devfeed.tech/tags/cms.md>), [craft](<https://devfeed.tech/tags/craft.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [great](<https://devfeed.tech/tags/great.md>), [insights](<https://devfeed.tech/tags/insights.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [library](<https://devfeed.tech/tags/library.md>), [manipulation](<https://devfeed.tech/tags/manipulation.md>), [modern](<https://devfeed.tech/tags/modern.md>), [powerful](<https://devfeed.tech/tags/powerful.md>), [simple](<https://devfeed.tech/tags/simple.md>), [vuejs](<https://devfeed.tech/tags/vuejs.md>), [works](<https://devfeed.tech/tags/works.md>)

### AI overview

This tutorial explains VueJS 2.0 and demonstrates replacing jQuery with VueJS on a Craft CMS website. It contrasts Vue's architecture for building interactive, data-driven frontend interfaces with jQuery's DOM-manipulation toolkit.

### Source excerpt

VueJS is a simple yet powerful library for building modern web interfaces, and it works great with Craft CMS