vuejs / docs

πŸ“„ Documentation for Vue 3
https://vuejs.org
Other
2.82k stars 4.13k forks source link

Composition API reference #97

Closed NataliaTepluhina closed 4 years ago

NataliaTepluhina commented 4 years ago

This is mostly a copy of https://vue-composition-api-rfc.netlify.app/api.html with few subtle changes. I believe the reference there is sufficient enough (maybe sometimes too detailed). Would be happy to hear your thoughts!

NataliaTepluhina commented 4 years ago

@znck @phanan @Jinjiang thank you all for all the awesome fixes and suggestions! I've changed the PR accordingly, please take a second look whenever you have a chance πŸ™

NataliaTepluhina commented 4 years ago

@pikax sorry, I failed to add you to reviewers list on the 1st review πŸ€¦β€β™€οΈ

Would be happy if you could take a look!

Jinjiang commented 4 years ago

@NataliaTepluhina for Reactivity APIs I have some further ideas. When I'm trying to find the usage of these APIs for a special purpose like read-only data, I need to know readonly, isReadonly, and shallowReadonly, markRaw at the same time. But they are in 3 different sub pages. It feels like a little bit inconvenient.

I think for guidelines it's better to separate things into basic and advanced parts. But for references, maybe it's better to separate them into groups for different cases or purposes, like:

Does that make more sense? ... or just don't group them and assemble them into one page together?

Thanks πŸ˜„

NataliaTepluhina commented 4 years ago

@Jinjiang What if we place them on the same page (Reactivity API) but group them with subsections you mentioned?

Jinjiang commented 4 years ago

I personally think that’s great πŸ™‚ @NataliaTepluhina

NataliaTepluhina commented 4 years ago

@Jinjiang I still ended up dividing it onto 3 pages just for the sake of the effective sidebar usage: if we place them to the same page, some sections will go to h4 and they won't be shown on the sidebar. To improve UX with better navigation, I've done this splitting and added lots of cross-links between sections. Could you please take another look?

Also, a huge thanks for these suggestions! It makes lots of sense in terms of structuring the API properly πŸ‘

Jinjiang commented 4 years ago

@NataliaTepluhina that looks much better to me :-) Just one more little struggled idea: how about change the title "Proxy-related APIs" to "Basic" directly? Because:

  1. People may not know the Proxy things behind these APIs before them deeply look into it.
  2. This part is more like inherited + extended from the "traditional" Vue.observable() way in Vue 2.x.

WDYT? :-)

NataliaTepluhina commented 4 years ago

@Jinjiang done! πŸ˜…

Jinjiang commented 4 years ago

@NataliaTepluhina looks great. no more from my side. :-)

NataliaTepluhina commented 4 years ago

@pikax thank you for the detailed review! I've addressed your comments, would you mind taking a look again? πŸ˜…

NataliaTepluhina commented 4 years ago

Thanks everyone for the review! I am merging this beast so if we have any fixes, let's handle them in the follow-up PRs