I\'m trying to resize a canvas when a sibling component mounts and unmounts. My stripped down JSX structure is this