I have a component, child-component pair.
However, when I try to move some of this logic to a hook, the parent rerenders, but the child does not. The props passed to the children change, so why doesn't the child ge rerendered??
Console Logs
// first render, data not loaded from local storage yet, etc
CanvasBusDebug.tsx:36 Rendering canvas bus debug
CanvasBusDebug.tsx:15 Calculating root data
CanvasBusDebug.tsx:19 Metadata: []
CanvasBusDebug.tsx:39 Root items: []
CanvasHierarchySection.tsx:15 Rendering canvas hierarchy section <--- child gets rendered
CanvasHierarchySection.tsx:16 root items []
// data gets loaded, now there are metadatas
// however CanvasHierarchySection is never rendered again
CanvasBusDebug.tsx:36 Rendering canvas bus debug
CanvasBusDebug.tsx:15 Calculating root data
CanvasBusDebug.tsx:19 Metadata: (2) [{…}, {…}]
CanvasBusDebug.tsx:28 [CanvasBusDebug] Sorting punctual-1761808294591-canvaspunctual-1761808294591 vs punctual-1761808355949-canvaspunctual-1761808355949 = 0
CanvasBusDebug.tsx:39 Root items: (2) [{…}, {…}]
<--- CanvasHierarchySection never rendered again!
This version with no hook works: https://gist.github.com/dustinlacewell/4173e4b4ac5619fa1acbc53979b605d3
This version where I move some of the logic to a hook, causes the child to stop rendering as shown above: https://gist.github.com/dustinlacewell/e9e09898fa3fbd89f7f8b0de156ad890
I am just looking for some help trying to understand specifically why in the broken version the child component never gets rendered again