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
Sometimes there's a need to reuse small bits of html, but I (and many others I hope) found it not worth to create a new file. In React I would create a small const variable (aka component) in the same file, and I think this should be possible in svelte too.
I will close this as there's already some discussion about the problem.
Maybe some preprocessor would be ideal, as said in #2858
I'll try to implement it
Sometimes there's a need to reuse small bits of html, but I (and many others I hope) found it not worth to create a new file. In React I would create a small
const
variable (aka component) in the same file, and I think this should be possible in svelte too.In React it would look something like this:
I propose something like:
Another way to do this would be with something like
<div component="ImageWithTitle">...</div>
.The text was updated successfully, but these errors were encountered: