function forceUpdateReactVirtualizedComponent(
  component,
  currentIndex = 0,
) {
  const recomputeSize =
    typeof component.recomputeGridSize === 'function'
      ? component.recomputeGridSize
      : component.recomputeRowHeights;

  if (recomputeSize) {
    recomputeSize.call(component, currentIndex);
  } else {
    component.forceUpdate();
  }
}
Since RV components use shallowCompare we need to force a render (even though props haven't changed).
However InfiniteLoader may wrap a Grid or it may wrap a Table or List.
In the first case the built-in React forceUpdate() method is sufficient to force a re-render,
But in the latter cases we need to use the RV-specific forceUpdateGrid() method.
Else the inner Grid will not be re-rendered and visuals may be stale.

Additionally, while a Grid is scrolling the cells can be cached,
So it's important to invalidate that cache by recalculating sizes
before forcing a rerender.