Some confusions about Vuejs3 #7721
Unanswered
taozuhong
asked this question in
Help/Questions
Replies: 1 comment
-
1.Documentation can be switched to Composition api, some documents may have options api + setup writing method, I think this part is actually quite interesting, this is more like an intermediate state from options api to setup script. As for using it together, I have experienced it in a project around me. Two students maintain the same code. Student A will use setup(), and student B will still use data/method. You will crash when checking the code, so it is recommended is to choose one of them.
Hope that can solve your confusion. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What problem does this feature solve?
Example code add
Composition api
supportVuejs docs recommend
Composition api
, but most of example code areOptions api
, so please addComposition api
code example stay withOptions api
code example together.I do believe it will be good for
Composition api
.Improve the
Composition api
compatible withOptions api
Vuejs docs say the
Composition api
equal toOptions api
, But I found that the example code has much more different, like:mounted ==> onMounted, computed ==> onComputed / ...
,Why not let them use the same name in
Composition api
andOptions api
?Why not import them(ref/mounted/computed/created) automatically?
I do think using the same name will be accepted quickly by most of users.
Beta Was this translation helpful? Give feedback.
All reactions