Skip to content

syncable #30

@gregroyal

Description

@gregroyal

I'm not sure the syncable example is working or I'm doing something wrong

I created this to demonstrate

https://codesandbox.io/s/sweet-surf-f2wq7y?file=/index.js

import App from "./App.svelte";
import { asyncable, syncable } from "svelte-asyncable";
import { get } from "svelte/store";

const app = new App({
  target: document.body
});

export default app;

let todos = asyncable(() => ["my async value"]);

todos.subscribe((result) => {
  result.then((r) => {
    console.log("this", r);

    const todosSync = syncable(todos, ["bleh"]);
    console.log(get(todosSync));
  });
});

I would expect todosSync to display "my async value" not "bleh"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions