-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructors rather than factories #2
Comments
hontas
added a commit
to hontas/svelte
that referenced
this issue
Mar 7, 2020
Rich-Harris
pushed a commit
that referenced
this issue
Jun 2, 2020
5 tasks
trueadm
added a commit
that referenced
this issue
Aug 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having gone back and forth on this, I think it makes more sense for components to be constructors rather than factories – i.e. instead of this...
...this:
This makes Svelte components slightly more familiar for people coming from e.g. Ractive or Vue, and has this important benefit:
(Capitalising filenames makes sense because inline components should also be capitalised, i.e.
<Widget foo='bar'/>
– this is a good way to visually distinguish elements from components in a way that doesn't make them look like web components.)The text was updated successfully, but these errors were encountered: