npm.io
1.0.2 • Published 2 years ago

svelte-exec

Licence
MIT
Version
1.0.2
Deps
0
Size
4 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Svelte-Exec

A tiny svelte component to emit a load event when the component is loaded.

Installation

npm install svelte-exec

Usage

<script>
	import Exec from 'svelte-exec';
</script>

<Exec on:load={() => {
  console.log('Hello World!');
}} />

In this example, when the component is loaded it will emit a load event, which can be listened to using the on:load syntax in the parent component.

Events

  • load: emitted when the component is loaded.

Keywords