Shorten the composables api #42
Replies: 3 comments 8 replies
-
Besides another thing is confusing me. We are using the word |
Beta Was this translation helpful? Give feedback.
-
Also by the way, are Currently I will get types error when trying to visit those like |
Beta Was this translation helpful? Give feedback.
-
Here is my consideration: Explictly mark the scope of the data In fact, I think the configuration scope is what really makes new comers confused. So I tried to explain it in v2 docs: https://vuepress.github.io/guide/configuration.html#config-scopes That's how I named those useApi:
For example, So I personally prefer to keep those scope prefix. As for the Now we simply put everything in I'll open another discussion for that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We are all using $page $frontmatter $lang in V1, and we are familiar with it.
In my opinion the composables api is too long now.
I think we should provide a short one @meteorlxy , here is your code in theme default:
So why not just use:
It's easier to read and write.
I think we should provide short ones for alias intead of forcing people to use long api name.
Beta Was this translation helpful? Give feedback.
All reactions