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:
Samuel Andert
2023-07-24 15:00:05 +02:00
parent 5b7c49fd58
commit e12f6bcf05
6 changed files with 106 additions and 19 deletions

View File

@ -11,14 +11,24 @@
`,
children: [
{
id: 1,
id: 'login1',
componentName: 'Login',
props: {},
slot: 'login',
children: [
{
id: 5,
componentName: 'Wallet'
id: 'wallet1',
componentName: 'Wallet',
state: {
rpcURL: 'https://rpc.gnosischain.com/',
pkpPubKey:
'046da3ba67065fd1e2726242ca01cd4601524893f4aa4b0042578fa6cbec28fa8c9a28eb9f7893932fc09717edc9e1db57e157a21eed346247c1db5a722a01f571'
},
children: [
{
id: 'HelloEarth1',
componentName: 'HelloEarth',
map: { pkp: 'wallet1.pkpPubKey', rpcURL: 'wallet1.rpcURL' }
}
]
}
]
},