def _get_all_hooks_internal(self) -> dict[str, VarData | None]:
        """Get the reflex internal hooks for the component and its children.

        Returns:
            The code that should appear just before user-defined hooks.
        """
        # Store the code in a set to avoid duplicates.
        code = self._get_hooks_internal()

        # Add the hook code for the children.
        for child in self.children:
            code = {**code, **child._get_all_hooks_internal()}

        return code
Get the reflex internal hooks for the component and its children.

        Returns:
            The code that should appear just before user-defined hooks.
        
reflex/components/component.py