1) Why can't you use reactive to declare multiple variables as you are doing with ref and computed. I'm not sure I see why that is an advantage unless I misunderstand the usage.
2) Why, in your blog post example did you chose to declare a reactive array directly instead of reactive({ blogPosts: [] }) which would have made more sense and have largely the equivalent behaviour to using ref.
The API RFC document seems to explain fairly well where reactive and ref should and should not be used. I don't really see where reactive could really be dangerous outside of simply not understanding how it will behave relative to ref and computed.
I guess I have a few questions about this.
1) Why can't you use
reactive
to declare multiple variables as you are doing withref
andcomputed
. I'm not sure I see why that is an advantage unless I misunderstand the usage.2) Why, in your blog post example did you chose to declare a reactive array directly instead of
reactive({ blogPosts: [] })
which would have made more sense and have largely the equivalent behaviour to usingref
.The API RFC document seems to explain fairly well where
reactive
andref
should and should not be used. I don't really see wherereactive
could really be dangerous outside of simply not understanding how it will behave relative toref
andcomputed
.vue-composition-api-rfc.netlify.co...