일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 블로그만들기
- 빅오
- isNaN
- 해쉬
- 알고리즘
- js알고리즘
- aws lightsail
- react-query
- nestjs
- 슬라이딩윈도우
- cookie
- 투포인터
- never타입
- typscript
- NextAuth
- JavaScript
- nextjs
- 스택
- textarea autosize
- tailwindcss
- TypeScript
- react
- 그리디
- 정렬
- styled-components
- next.js
- 큐
- 라이프사이클
- 버블정렬
- Algorithm
- Today
- Total
목록Vue (2)
far
const state = reactive({ dino: props.dino, commentList: [], replyidNum: [], idCount: [], counting: 1, }); const reply = async () => { await axios .post(url, body, { headers }) .then((res) => { for (let index = 0; index < res.data.replyList.length; index++) { const element = res.data.replyList[index].id; if (!state.replyNum.includes(element)) { state.replyNum.push(element); } if (state.replyNum.i..

라이프사이클 훅(Lifecycle Hooks) 라이프사이클이란 Vue의 인스턴스나 컴포넌트가 생성되고 소멸되기까지의 단계를 말하며, 특정 단계에서 개발자가 의도하는 로직이 실행될 수 있도록 도와준다. 라이프사이클 훅의 단계는 Option API기준 Creation -> Mounting -> Updating -> Destruction 순서로 실행된다. 하지만 Vue3(Composition API)에서는 setup 프로퍼티가 creation을 담당하기 때문에 creation의 사용이 불필요해졌다. 그래도 여전히 vue생태계는 Vue2(Option API)를 사용하는 곳이 많기 때문에 creation이 어떻게 작동되는지 알아둘 필요는 있다. (괄호 안은 Composition API) 1. beforeCreat..