usecrate::*;/// Implementation of ComponentContext construction.
implComponentContext{/// Creates a new empty component context.
pubfnnew()->Self{letmut ctx: ComponentContext =ComponentContext::default();
ctx.set_hooks(Vec::new());
ctx.set_hook_index(0_usize);
ctx
}}/// Implementation of component context lifecycle and utility methods.
implComponentContext{/// Resets the hook index for a new render cycle.
pubfnreset_hook_index(&mutself){self.set_hook_index(0_usize);}}