Svelte: Allow methods in use:action like: use:instance.method={....} or use:obj.method={....}

Created on 16 Nov 2019  路  2Comments  路  Source: sveltejs/svelte

Would be nice to pass a class or an object method

Can be solved with a closure ....

proposal

Most helpful comment

You can now do use:obj.method={...} in 3.26.0.

All 2 comments

And very readable and helpfull, because I recently ran in this design limitation: https://github.com/sveltejs/svelte/issues/3923 : multiple arguments in `use:action not allowed by design.

You can now do use:obj.method={...} in 3.26.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rich-Harris picture Rich-Harris  路  3Comments

thoughtspile picture thoughtspile  路  3Comments

ricardobeat picture ricardobeat  路  3Comments

1u0n picture 1u0n  路  3Comments

bestguy picture bestguy  路  3Comments