diff --git a/src/lib/components/refactor/ComposerAlice.svelte b/src/lib/components/refactor/ComposerAlice.svelte index fe1fcd7..1c7eb52 100644 --- a/src/lib/components/refactor/ComposerAlice.svelte +++ b/src/lib/components/refactor/ComposerAlice.svelte @@ -15,10 +15,10 @@ } -
My ID is: {me.id}
- I am the parent, this is my state: {$data.state} + My state is: {$data.state}My ID is: {me.id}
- i am the child and this is my state: {$data.state} + My state is: {$data.state} -My ID is: {me.id}
+ + My state is: {$data.state} {#if $data.store.todos} {#each $data.store.todos as todo}{todo.text}
{/each} {/if}{message.text}
diff --git a/src/lib/components/refactor/ComposerWrap.svelte b/src/lib/components/refactor/ComposerWrap.svelte index 5b1f807..0189c82 100644 --- a/src/lib/components/refactor/ComposerWrap.svelte +++ b/src/lib/components/refactor/ComposerWrap.svelte @@ -31,7 +31,7 @@ component: 'ComposerCharly', slot: 'aside', data: { - queries: { + map: { todos: queryTodos, messages: queryMessages } diff --git a/src/lib/core/refactor/Composer.svelte b/src/lib/core/refactor/Composer.svelte index 5352a9e..18b4b3e 100644 --- a/src/lib/core/refactor/Composer.svelte +++ b/src/lib/core/refactor/Composer.svelte @@ -115,8 +115,8 @@ if (child.id) { child.store = createComposerStore(child.id, child.store || {}); - if (child.data?.queries) { - subscribeAndMapQueries(child.id, child.data.queries); + if (child.data?.map) { + subscribeAndMapQueries(child.id, child.data.map); } }