Converts a bunch of syntax from Ractive 1.2.0 to Svelte 3.16.0
computed properties to reactive statementsdata() to export let statementsonrender into OnMount, onteardown (and ondestruct...) into OnDestroyoninit contents to global scope{{{...}}} to {@html ...}{{ and }} to { and }@shared to store@shared.propName --> $propName<link> to import statementsractive-component-loader which uses html <link> elments to import sub componentson- event handler forms to valid svelte handlerson-click="@.myMethod()" --> on:click={myMethod}on-click="myEvent" --> on:click={myEvent} (assumes you'll convert your .on handler to a global function)on-click="@.myMethod(some, stuff)" --> on:click={() => myMethod(some, stuff)}on-click="['eventname'... we didn't use that syntax much...fire to dispatchcreateEventDispatcher and creates one called dispatch{{yield}} to <slot /> (handles named yields to named slots tooFor some things, it simply adds a todo comment:
each statement without an alias--svelte requires an aliasthis.find -- use bind:this={myEl} this.findComponent -- use bind:this={myComponent} and export the function you want to call from the sub component