Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating from rdb:svelte-meteor-data #19

Open
skandragon opened this issue Jan 17, 2022 · 1 comment
Open

Migrating from rdb:svelte-meteor-data #19

skandragon opened this issue Jan 17, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@skandragon
Copy link

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
@zodern zodern added the documentation Improvements or additions to documentation label Feb 13, 2022
@zodern
Copy link
Owner

zodern commented Feb 13, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants