DEV Community

Discussion on: Composition api or Options api?

Collapse
 
lordsayur profile image
Omar

I totally agree with your regarding DX on using CompA. It is even worst when using CompA on Vue 2 project where we need to be aware all Vue 2 reactivity caveat. Things really get messy if i have array of big nested objects, and when doing v-for and want to process some of nested properties on an event by passing the nested property to event handler and trying to mutate the nested property. Normally i only use single ref on an array of nested objects. i never use nested reactive variable as i dont like the inconsistency auto unwrap behavior. the nested reactive is not fully documented in the document too. but i still like CompA especially in term of code organization. In my opinion, ref and reactive are quite messy. although i might handle the messiness, but it will be hard for any other junior dev on the same project

Collapse
 
the_one profile image
Roland Doda

Thanks for you comment Omar.