rixo / svench

A lightweight workbench to develop your Svelte components in isolation
svench-docs.vercel.app
207 stars 6 forks source link

Turn View action into a function that can be passed around #39

Closed jacob-8 closed 3 years ago

jacob-8 commented 3 years ago

I expected to be able to use the action function in a manner like this: image

But it doesn't work. It only works when used as on:click={action('clicked'). I would have expected it could be used as on:click={() => action('clicked')} as all of my other functions are.

jacob-8 commented 3 years ago

My apologies. I'm off my rocker. Things work great as explained in https://svench-docs.vercel.app/_/Usage/actions, I just didn't know the proper syntax of doing action('copied', clip).