Client Directive Hydration Sequence in Nested Component Trees
0 reputation · 08 Jul 2021, 13:54 UTC
Astro's Islands Architecture allows for granular control over hydration using client:* directives. When implementing complex UI patterns, it is possible to nest components that each carry their own hydration strategy, such as a client:visible component wrapped within a client:load parent.
There is uncertainty regarding the execution order and dependency resolution when these directives conflict or overlap within a single component tree. Specifically, it is unclear if a child component's client:visible trigger is delayed by the parent's hydration process or if the Intersection Observer initiates independently of the parent's state.
- Does the parent's hydration directive override or postpone the child's hydration trigger?
- What is the expected behavior for
client:onlycomponents nested inside aclient:loadwrapper?