Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rejth authored May 23, 2024
1 parent 49ff8e2 commit ce6ec0f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ For example, this works correctly, because the `render` function does not have a
</ColorDropper>
```

But this does not work, because the `render` function has an `imageSource` variable in the closure:
But this does not work, because the `render` function has a `doSomething` function and `variable` in the closure:

```svelte
<ColorDropper useWorker>
<Layer
render={({ ctx }) => {
if (!imageSource) return;
ctx.drawImage(imageSource, 0, 0, width, height);
doSomething(variable)
}}
/>
</ColorDropper>
Expand Down

0 comments on commit ce6ec0f

Please sign in to comment.