feat(components): Initialize component state and enable property mapping
- Ensure every component has an initialized state, defaulting to empty. - Implement property mapping to synchronize states between parent and child components.
This commit is contained in:
@ -1 +1,10 @@
|
||||
<div class="p-12 bg-blue-400">Hello Earth</div>
|
||||
<script>
|
||||
export let id;
|
||||
|
||||
import { getComponentStore } from '$lib/stores/componentStores.ts';
|
||||
|
||||
const store = getComponentStore(id);
|
||||
$: console.log('store:', $store);
|
||||
</script>
|
||||
|
||||
<div class="p-12 bg-blue-400">Hello Earth {JSON.stringify($store)}</div>
|
||||
|
Reference in New Issue
Block a user