You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something I found missing was boilerplate for composables. As I have adopted the composables api, I'm refactoring out features and reactive code to be reused.
My Feature request is add an option to generate this boilerplate.
For the cli switch because composables are often named useX, -u makes sense to me.
vgent make -u <composable_name>
The default directory for composables is src/composables.
Here is an example template for a composable named useFeature.ts
exportinterfaceUseFeatureOptions{}/** * useFeature */exportfunctionuseFeature(options: UseFeatureOptions={}){const{// add default for each option}=optionsreturn{}}exporttypeUseFeatureReturn=ReturnType<typeofuseFeature>
Anywhere that useFeature is should be replaced with <composable_name>.
For TypeScript that's the minimum common boilerplate.
The text was updated successfully, but these errors were encountered:
Something I found missing was boilerplate for composables. As I have adopted the composables api, I'm refactoring out features and reactive code to be reused.
My Feature request is add an option to generate this boilerplate.
For the cli switch because composables are often named useX,
-u
makes sense to me.vgent make -u <composable_name>
The default directory for composables is
src/composables
.Here is an example template for a composable named
useFeature.ts
Anywhere that
useFeature
is should be replaced with<composable_name>
.For TypeScript that's the minimum common boilerplate.
The text was updated successfully, but these errors were encountered: