INNER CODE UNIT · JavaScript
reload
fengshao1227/ccg-workflow · dsh-ccg/src/index.js:596
const reload = async (next) => {
if (deepEqualJson(next, active)) return
active = next
const previous = fiber
fiber = undefined
if (previous !== undefined) await previous.dispose()
fiber = mountMatrix(ctx, next, { getTable })
}
// Optional: a deployment without the storage form still hires teammates, it
// just cannot check or remember who owns what.
ctx.inject(['storageDomain'], (storeCtx) => {
storeCtx.effect(() => {
let domain
const opening = openTeamMemory(storeCtx).then(
(handle) => {
domain = handle
teammates = handle.table('teammates')