function _getNodesToRender() {
    const {innerWidth, innerHeight} = innerDimensions;
    const {data, mode, padding, sortFunction, getSize} = props;
    if (!data) {
      return [];
    }

    if (mode === 'partition' || mode === 'partition-pivot') {
      const partitionFunction = partition()
        .size(
          mode === 'partition-pivot'
            ? [innerHeight, innerWidth]
            : [innerWidth, innerHeight]
        )
        .padding(padding);
      const structuredInput = hierarchy(data)
        .sum(getSize)
        .sort((a, b) => sortFunction(a, b, getSize));
      const mappedNodes = partitionFunction(structuredInput).descendants();
      if (mode === 'partition-pivot') {
        return mappedNodes.map(node => ({
          ...node,
          x0: node.y0,
          x1: node.y1,
          y0: node.x0,
          y1: node.x1
        }));
      }
      return mappedNodes;
    }
    if (mode === 'circlePack') {
      const packingFunction = pack()
        .size([innerWidth, innerHeight])
        .padding(padding);
      const structuredInput = hierarchy(data)
        .sum(getSize)
        .sort((a, b) => sortFunction(a, b, getSize));
      return packingFunction(structuredInput).descendants();
    }

    const tileFn = TREEMAP_TILE_MODES[mode];
    const treemapingFunction = treemap(tileFn)
      .tile(tileFn)
      .size([innerWidth, innerHeight])
      .padding(padding);
    const structuredInput = hierarchy(data)
      .sum(getSize)
      .sort((a, b) => sortFunction(a, b, getSize));
    return treemapingFunction(structuredInput).descendants();
  }
Create the list of nodes to render.
@returns {Array} Array of nodes.
@private