Provide a "what does it look like" section

People who browse github trending (like myself) generally open interesting things in new tabs, skim the readme, and star the project. I think it's important that we don't go straight from a description into how to contribute. Often people won't visit the site, and instead want a super quick glimpse from the readme, before they star the project for later perusal.
pull/2560/head
Antony Jones 7 years ago committed by GitHub
parent a06f92a930
commit 59a44ef2a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,6 +11,25 @@ Svelte is a new way to build web applications. It's a compiler that takes your d
Learn more at the [Svelte website](https://svelte.dev), or stop by the [Discord chatroom](https://discord.gg/yy75DKs). Learn more at the [Svelte website](https://svelte.dev), or stop by the [Discord chatroom](https://discord.gg/yy75DKs).
## What does it look like?
Svelte Components are single-file components, which contain HTML, styles, and some JavaScript. At compile time, the component is transformed into vanilla JavaScript, ready for the browser.
```
<script>
let count = 0;
function handleClick() {
count += 1;
}
</script>
<button on:click={handleClick}>
Clicked {count} {count === 1 ? 'time' : 'times'}
</button>
```
You can interact with live examples like this one on the [Svelte website](https://svelte.dev).
## Development ## Development

Loading…
Cancel
Save