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:
@ -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' }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Reference in New Issue
Block a user