Phong Duong

🔎Search

Shorthand props in Svelte

05-08-2020 | #svelte

If you pass a state that has name match the attribute or prop, you can use shorthand props to speed up developing time

<img src={src} />
// Use shorthand attribute
<img {src} />

Share: TwitterFacebookLinkedInHacker News