Open Ubugeeei opened 2 months ago
This issue looks like it's related to PR #123 ?
I've created new BlockEffectScope
and createChildFragmentDirectives
functions that I hope will help make it easier to implement Lifecycle Hooks in Vapor. such as the lifecycle in slots or in components
If an update to a value is passed layer by layer from outside to inside, it will eventually only trigger the update hook of the component that actually uses the value. Such a design is obviously more efficient.
packages/runtime-vapor/tests/apiLifecycle.spec.ts | +319 to +327
// FIXME: not called
expect(calls).toEqual([
// 'root beforeUpdate',
// 'mid beforeUpdate',
'child beforeUpdate',
'child updated',
// 'mid updated',
// 'root updated',
])
But this design differs from core. How should we balance between the two?
relates #215
There seem to be some points where the behavior differs from the original. I added FIXME comments in packages/runtime-vapor/tests/apiLifecycle.spec.ts.