refactoring next part

This commit is contained in:
Samuel Andert
2023-08-04 17:34:39 +02:00
parent 481cc8cf68
commit 8214792f01
7 changed files with 127 additions and 37 deletions

View File

@ -3,6 +3,7 @@
import { assign } from 'xstate';
import { queryMessages } from '$lib/data/queryMessages';
import { get } from 'svelte/store';
import { coreServices } from '$lib/core/refactor/coreServices';
let composer = {
id: 'ComposerParent',
@ -30,18 +31,15 @@
id: 'ComposerCharly',
component: 'ComposerCharly',
slot: 'aside',
data: {},
machine: {
initial: 'LOADING',
context: {
hello: 'start',
messages: []
},
// context: {
// hello: 'start',
// messages: []
// },
states: {
LOADING: {
entry: assign({
messages: (context, event) => get(queryMessages)
}),
entry: () => {},
on: {
TOGGLE: {
target: 'READY'