Closed danilowoz closed 2 months ago
/*
Pass instantiation of observable primitives
function MyStore(props) { const list = props.list().map(signal)
return {
async addItem(text) {
list.push(signal(text))
}
}
}
"store_mounted", { store, storeContainer, parentStoreContainer, props: { }, observables: [{ type: 'signal', name, initialValue, ref, }, { type: 'derived', name, initialValue, ref, }, { type: 'effect', name, ref, }] }
"signal_updated", { value, ref } // Can create event for flagged and computed "derived_updated", { value, ref }
"effect_updated", { ref } */
Review or Edit in CodeSandbox
Open the branch in Web Editor • VS Code • Insiders
Open Preview