Skip to content

Commit

Permalink
Merge pull request #528 from inokawa/svelte5
Browse files Browse the repository at this point in the history
Migrate to Svelte 5
  • Loading branch information
inokawa authored Oct 27, 2024
2 parents a4c2de0 + de5d9e0 commit 2121c7f
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 2121c7f

Please sign in to comment.