Skip to content

Commit

Permalink
Migrate to Svelte 5
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Oct 27, 2024
1 parent a4c2de0 commit de5d9e0
Show file tree
Hide file tree
Showing 10 changed files with 293 additions and 369 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export const App = () => {

### Svelte

`svelte >= 4.0` is required.
`svelte >= 5.0` is required.

```svelte
<script lang="ts">
Expand All @@ -263,16 +263,18 @@ export const App = () => {
const data = Array.from({ length: 1000 }).map((_, i) => sizes[i % 4] );
</script>
<VList {data} let:item let:index style={`height: 100vh;`} getKey={(_,i) => i}>
<div
style={`
height: ${item}px;
background: white;
border-bottom: solid 1px #ccc;
`}
>
{index}
</div>
<VList {data} style={`height: 100vh;`} getKey={(_, i) => i}>
{#snippet children({ item, index })}
<div
style={`
height: ${item}px;
background: white;
border-bottom: solid 1px #ccc;
`}
>
{index}
</div>
{/snippet}
</VList>
```

Expand Down
Loading

0 comments on commit de5d9e0

Please sign in to comment.