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
The main reason I want this is to write private component simple. It is not worth creating another file to pollute my eyes.
In react, it is easy to define multiple components in one file, export somes and self use somes. Every component can be written in the same way.
In vue, Single-File Component is the most comfortable way to write a component. But it is public, I have to name a good name, make good folder struecture, switching files in editing.
I know there are problems. For example, each template's scope.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want define multiple template that can be reuse or reference in other places, like the things in JS.
Currently I have to write code like:
Mix vue template, jsx, h function or template string is not a comfortable experience.
I want I can write code like this:
And even more:
(this makes the main template small, clean and not too deep)
The main reason I want this is to write private component simple. It is not worth creating another file to pollute my eyes.
In react, it is easy to define multiple components in one file, export somes and self use somes. Every component can be written in the same way.
In vue, Single-File Component is the most comfortable way to write a component. But it is public, I have to name a good name, make good folder struecture, switching files in editing.
I know there are problems. For example, each template's scope.
Beta Was this translation helpful? Give feedback.
All reactions