반응형

300===Dev Framework/VueJS 7

Vue 3 컴포넌트 구조 - script 먼저 vs template 먼저

Vue.js로 컴포넌트를 만들다 보면 .vue 파일 안에서 , 하지만 Vue 3와 함께 Composition API 와 이 등장하면서 상황이 조금 달라졌어요. 을 사용하면 블록 안에서 정의한 변수나 함수를 바로 에서 사용할 수 있게 되면서, 의 역할이 훨씬 중요해졌죠. 이제 로직과 상태 정의가 컴포넌트의 핵심 시작점이 되는 경우가 많아졌습니다. 🚀핵심 원리: 순서, 중요할까?결론부터 말하면, Vue 컴파일러는 , , 블록의 순서에 상관없이 컴포넌트를 올바르게 해석하고 빌드합니다. 즉, 기술적으로 어떤 순서로 작성하든 컴포넌트의 기능 자체에는 영향을 주지 않아요. 🙌하지만 가독성과 유지보수성 측면에서는 이야기가 다릅니다. 어떤 순서를 따르느냐에 따라 개발자가 코드를 읽고 이해하는 방식이 달라질 수..

Vue2 기초 개념 완벽 가이드 😎

안녕하세요! 오늘은 Vue2의 핵심 기초 개념들을 쉽고 재미있게 설명해드리려고 해요. Vue2를 한마디로 정의하자면, 사용자 인터페이스(UI)를 만들기 위한 JavaScript 프레임워크입니다.만약 여러분이 레고 블록을 맞추듯이 원하는 웹 애플리케이션을 조립해나갈 수 있다면 얼마나 편리할까요? Vue2는 그런 꿈을 실현해주는 강력하고 직관적인 도구랍니다.1. Vue2란? 🤔Vue2는 "점진적 프레임워크(Progressive Framework)"라는 별칭을 가지고 있어요. 이는 기존 프로젝트에 조금씩 도입할 수 있다는 뜻입니다.예를 들어, 완전히 새로운 프로젝트를 시작하지 않아도, 현재의 웹 페이지나 앱의 특정 영역을 Vue로 먼저 구축해볼 수 있죠.🔹 Vue2의 주요 특징점진적 도입 가능: 처음엔 ..

Vue Beginner Tutorial Part (lifecycle, watchers, components)

Lifecycle Hooks and Template RefsLifecycle Hooks are used to manually and timely manipulate the DOM.Vue has been handling all the DOM updates for us, due to reactivity and declarative rendering.However, inevitably there will be cases where we need to manually work with the DOM.We can request a template ref - i.e. a reference to an element in the template - using the special ref attribute:A lifec..

Vue Beginner Tutorial (attribute, form binding, event, condition, list rendering)

Declarative renderingThe core feature of Vue is declarative rendering:1 Using a template syntax that extends HTML we can describe how the HTML should look like based on JavaScript state.2 When the state changes, the HTML updates automatically.Reactive StateState that can trigger updates when changed are considered reactive.In Vue, reactive state is held in components.We declare reactive state us..

728x90
반응형