In what order do unmounting lifecycle methods execute when a parent and child component both unmount?
When both parent and child components unmount, React follows a specific order: child components' unmounting lifecycle methods are called before their parent components'. This means the child's componentWillUnmount (or useEffect cleanup) runs first, followed by the parent's. This bottom-up approach ensures children can clean up before their parents.