finished correct decoupling of action with svelte stores
This commit is contained in:
@ -1,7 +1,13 @@
|
||||
<script lang="ts">
|
||||
import components from '$lib/components.ts';
|
||||
import { getContextStore } from '$lib/stores/contextStore.ts';
|
||||
export let componentsData = [];
|
||||
|
||||
// For each component, get or create its context store
|
||||
componentsData.children.forEach((child) => {
|
||||
child.store = getContextStore(child.componentName);
|
||||
});
|
||||
|
||||
async function getComponent(componentName) {
|
||||
if (components[componentName]) {
|
||||
const module = await components[componentName]();
|
||||
|
Reference in New Issue
Block a user