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

Document RxJS support #2571

Closed
Rich-Harris opened this issue Apr 26, 2019 · 3 comments · Fixed by #4226
Closed

Document RxJS support #2571

Rich-Harris opened this issue Apr 26, 2019 · 3 comments · Fixed by #4226

Comments

@Rich-Harris
Copy link
Member

Need to add to the docs the fact that you can now use RxJS/TC39 observables like regular stores

@MVSICA-FICTA
Copy link

MVSICA-FICTA commented Apr 26, 2019

Great, this means I get to dive into yet another web component related framework in the coming week! Just finished lit-html and lit-element and had a pretty good feeling there already.

I think my main question will revolve around injection options. Can Svelte components be used as functions and be dynamically injected at runtime? I had discovered the open-wc lit-element demos and there were some good strategies for component composition via factories and the like there as well. It would be good to document these different composition and injection options too.

Hardly had time to look at Svelte but at least it gets rid of the most obvious 'render' function declaration and now supports RxJS.

@TehShrike
Copy link
Member

#2549 (comment)

@evdama
Copy link

evdama commented Jan 6, 2020

Regarding docs, we have one REPL that has a code snippet https://svelte.dev/repl/51144b5ef95b53d14aede232d58aa14b?version=3.1.0

There's another quite similar snippet to be found here
https://bl.ocks.org/rveciana/0fdb54cb77770c3695425b8f633c7b3e

It might also make sense to elaborate a bit on how this relates to the overall store contract such as discussed here for example #4216

@kylecordes @trbrc do you think the REPL snippet from above is a suitable demo and could be used for documenting the use of RxJS with svelte? I'm new to Svelte and RxJS so I really don't feel competent enough to have an oppinioun how a few lines of text and a code snippet should look like in order to count as documentation...

Last but not least, in order to clarify things, when I can use the $observable$ syntax with svelte markup such as

{#await $observable$}
  pending - No value or error has been received yet
{:then result}
  fulfilled - Received a value
{:catch error}
  rejected - Received an error
{/await}

isn't something like https://github.com/timhall/svelte-observable now actually redundant to that native $observable$ syntax approach that we now have in Svelte?

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

Successfully merging a pull request may close this issue.

4 participants