후니후니

  • 홈
  • 태그
  • 방명록

actions 1

Pinia 4

Pinia Actions 이번 포스팅에서는 Pinia의 Actions에 대해서 다룰 예정이다. 공식문서에 나와 있는 예제는 아래와 같다. 예제 코드를 먼저 보자. export const useCounterStore = defineStore('counter', { state: () => ({ count: 0, }), actions: { // since we rely on `this`, we cannot use an arrow function increment() { this.count++ }, randomizeCounter() { this.count = Math.round(100 * Math.random()) }, }, }) defineStore 함수 내부에 actions를 통해서 함수를 등록할 수 있다...

Pinia 2022.09.07
이전
1
다음
더보기
프로필사진

후니후니

  • 분류 전체보기 (62)
    • Vue-cli 배포 (2)
    • ES6 (1)
    • 디자인 패턴 (3)
    • JavaScript (12)
    • TIL (0)
    • CSS (3)
    • 포트폴리오 제작기 (3)
    • Cypress (3)
    • React.js (10)
    • Nuxt.js (5)
    • TypeScript (3)
    • Vuetify (1)
    • Vue.js (3)
    • Github Action (1)
    • Three.js (2)
    • Pinia (4)
    • etc (2)
    • React Native (2)
    • DB (2)

Tag

Core Components, Front, JS, 타입스크립트, frontend, vue, react-query, Store, e2e, react query, NUXT, 자바스크립트, Cypress, vuetify, composition, Redux, react, 포트폴리오, vue3, pinia,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바