Observe changes in the attributes, children or text of an element.
This is custom React hooks, you need to follow the Basic Rules when you use it.
Count the children added to the list.
const useMutationObserver = <T extends HTMLElement = HTMLElement>(
callback: MutationCallback,
options: MutationObserverInit,
) => RefObject<T | null>