You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defineLifecycle(someAtom)({// first ins of current atom will mount// 第一个使用当前共享对象的组件实例将要挂载时触发 willMountwillMount(params){// params: { state, stateRoot, setState, setDraft }},// first ins of current atom mountedmounted(params){},// last ins of current atom unmountwillUnmount(params){},// any ins changed behavior(willMount, mounted, willUnmount) will trigger this methodonInsChanged(params){// params:// { op: 'willMount', mountedCount: 0 }// { op: 'mounted', mountedCount: 1 }// { op: 'willMount', mountedCount: 1 }// { op: 'mounted', mountedCount: 2 }// { op: 'willUnmount', mountedCount: 2 }// { op: 'willUnmount', mountedCount: 1 }},});
The text was updated successfully, but these errors were encountered:
新增
lifecycle
api,提供给用户需要根据组件挂载情况来触发逻辑的场景来使用,设计如下:The text was updated successfully, but these errors were encountered: