[Vue] Options API => Composition API 본문

Web/Vue

[Vue] Options API => Composition API

미니모아 2022. 10. 21. 16:30
반응형

Options API => Composition API

Options API                    |        Composition API
data() {...}                   |        ref(), reactive()
methods: {doSmth() {...}}      |        function doSmth() {...}
computed: {val() {...}}        |        const val = computed()
watch: {...}                   |        watch(dep, (val, oldV) => {})
provide: {...} / inject: []    |        provide(key, val), inject(key)
반응형

'Web > Vue' 카테고리의 다른 글

[Vue] Options API => Composition API: Lifecycle  (0) 2022.10.21
[Vue] Router  (0) 2022.09.13
[Vue] Vuex  (0) 2022.09.13
[Vue] v-model  (0) 2022.08.11
[Vue] 뷰 CLI에서 사용하는 NPM  (0) 2022.08.08
Comments