`getContextChangedKeys` only handles class components:
https://github.com/facebook/react/blob/355591add41c0f6dad738fdb1b6603e0786b7b4e/packages/react-devtools-shared/src/backend/renderer.js#L1276-L1304
const containerA = document.createElement('div');
    const containerB = document.createElement('div');
    const containerC = document.createElement('div');
    utils.act(() => legacyRender(<Parent count={2} />, containerA));
    utils.act(() => legacyRender(<Parent count={1} />, containerB));
    utils.act(() => store.profilerStore.startProfiling());
    utils.act(() => legacyRender(<Parent count={3} />, containerA));
    utils.act(() => legacyRender(<Parent count={1} />, containerC));
    utils.act(() => legacyRender(<Parent count={1} />, containerA));
    utils.act(() => ReactDOM.unmountComponentAtNode(containerB));
    utils.act(() => legacyRender(<Parent count={0} />, containerA));
    utils.act(() => store.profilerStore.stopProfiling());
    const allProfilingDataForRoots = [];
    function Validator({previousProfilingDataForRoot, rootID}) {
      const profilingDataForRoot = store.profilerStore.getDataForRoot(rootID);
      if (previousProfilingDataForRoot != null) {
        expect(profilingDataForRoot).toEqual(previousProfilingDataForRoot);
      } else {
        expect(profilingDataForRoot).toMatchSnapshot(
          `Data for root ${profilingDataForRoot.displayName}`,
        );
      }
      allProfilingDataForRoots.push(profilingDataForRoot);
      return null;
    }
    const dataForRoots =
      store.profilerStore.profilingData !== null
        ? store.profilerStore.profilingData.dataForRoots
        : null;
    expect(dataForRoots).not.toBeNull();