melte icon indicating copy to clipboard operation
melte copied to clipboard

Migrating from rdb:svelte-meteor-data

Open skandragon opened this issue 3 years ago • 1 comments

It may be useful to have a guide to migrate from rdb:svelte-meteor-data to zodern:melte. Some suggestions:

No need for $var

In svelte-meteor-data, one uses:

$: players = useTracker(() => Players.find().fetch())

and then in the HTML:

{$players}

In Melte, this would become:

$m: players = Players.find().fetch()

and

{players}

No need to include anything

You do not need to include anything for $m: to work.

Remove rdb:svelte-meteor-data and svelte-compiler

$ meteor remove rdb:svelte-meteor-data
$ meteor remove svelte-compiler

You may also want to install typescript and svelte-preprocess:

$ meteor npm i typescript --save-dev
$ meteor npm i svelte-preprocess --save-dev

skandragon avatar Jan 17 '22 22:01 skandragon

Some apps use both svelte-meteor-data and melte, so it isn't necessary to migrate (the app from meteor create --svelte even comes with both). Though if anyone wants to, feel free to open a PR to add a migration guide.

zodern avatar Feb 13 '22 00:02 zodern