React component to render collection of items separated by space or other separator.

@visibleName React Group
495270
function Group(props) {
	var children = React.Children.toArray(props.children).filter(Boolean);
	if (children.length === 1) {
		return children;
	}

	// Insert separators
	var separator = props.separator;
	var separatorIsElement = React.isValidElement(separator);
	var items = [children.shift()];
	children.forEach(function(item, index) {
		if (separatorIsElement) {
			var key = 'separator-' + (item.key || index);
			separator = React.cloneElement(separator, { key: key });
		}
		items.push(separator, item);
	});

	return items;
}
1032884
private void render(SVG.Group obj)
   {
      debug("Group render");

      updateStyleForElement(state, obj);

      if (!display())
         return;

      if (obj.transform != null) {
         canvas.concat(obj.transform);
      }

      checkForClipPath(obj);

      boolean  compositing = pushLayer();

      renderChildren(obj, true);

      if (compositing)
         popLayer(obj);

      updateParentBoundingBox(obj);
   }
344896
function renderToString(page) {
  var layout = null, child = null, props = {};
  while ((layout = page.type.layout || (page.defaultProps && page.defaultProps.layout))) {
    child = React.createElement(page, props, child);
    _.extend(props, page.defaultProps);
    React.renderToString(React.createElement(page, props, child));
    page = layout;
  }
  return React.renderToString(React.createElement(page, props, child));
}
192168
function(renderData){
      var renderArr = Object.keys(renderData).map(function(mask){
        return {
          mask: mask,
          context: renderData[mask].context,
          component: renderData[mask].component,
          params: renderData[mask].params,
          data: renderData[mask].data
        }
      })
      function renderComp(renderArr){
        var partial = renderArr.shift();

        if(renderArr.length > 0) partial.params.children = [renderComp(renderArr)];
        partial.params.mask = partial.mask;
        partial.params.data = partial.data;
        partial.params.context = partial.context;

        if(!partial.component) {
          var result = partial.data || '';
          if(partial.params.children && partial.params.children[0]) result +=partial.params.children[0];
          return result;
        }

        return partial.component(partial.params)

      }
      return renderComp(renderArr);
    }
451512
function renderRecursive(render, remaining, results) {
  results = results || [];
  // Once components is exhausted, we can render out the results array.
  if (!remaining[0]) {
    return render(results);
  }

  // Continue recursion for remaining items.
  // results.concat([value]) ensures [...results, value] instead of [...results, ...value]
  function nextRender(value) {
    return renderRecursive(render, remaining.slice(1), results.concat([value]));
  }

  // Each props.components entry is either an element or function [element factory]
  return typeof remaining[0] === 'function'
    ? // When it is a function, produce an element by invoking it with "render component values".
      remaining[0]({ results, render: nextRender })
    : // When it is an element, enhance the element's props with the render prop.
      cloneElement(remaining[0], { children: nextRender });
}
1198472
function TagList(props: Props): React.Node {
  const { children, className } = props;
  const classes = cn("tags", className);
  return <div className={classes}>{children}</div>;
}
231036
function renderComponent() {
    const data = [[0.1, 0.15], [0.2, 0.3], [0.4, 0.6], [0.8, 0.9]];
    var svg = d3.select('svg')
      .datum(data);
    svg.select('.horizontal')
      .call(horizontalSvgBand);
    svg.select('.vertical')
      .call(verticalSvgBand);

    var canvas = d3.select('canvas').node();
    var ctx = canvas.getContext('2d');
    horizontalCanvasBand.context(ctx)(data);
    verticalCanvasBand.context(ctx)(data);
}
1033878
function AvatarList({ className, children, stacked }: Props): React.Node {
  const classes = cn(
    {
      "avatar-list": true,
      "avatar-list-stacked": stacked,
    },
    className
  );
  return <div className={classes}>{children}</div>;
}
231606
public function renderItems()
    {
        $items = [];
        foreach ($this->items as $i => $item) {
            if (isset($item['visible']) && !$item['visible']) {
                continue;
            }
            $items[] = $this->renderItem($item);
        }
        return implode("\n", $items);
    }
544481
def render(self, path):
        """"""
        return ReactComponent(
            self.layout,
            self.src_file,
            self.component_id,
            props=self.props,
            static_path=path)
529120
function GalleryPage(): React.Node {
  const options = (
    <React.Fragment>
      <Form.Select className="w-auto mr-2">
        <option value="asc">Newest</option>
        <option value="desc">Oldest</option>
      </Form.Select>
      <Form.Input icon="search" placeholder="Search photo" />
    </React.Fragment>
  );
  return (
    <SiteWrapper>
      <Page.Content>
        <Page.Header
          title="Gallery"
          subTitle="1 - 12 of 1713 photos"
          options={options}
        />

        <Grid.Row className="row-cards">
          {json.items.map((item, key) => (
            <Grid.Col sm={6} lg={4} key={key}>
              <GalleryCard>
                <GalleryCard.Image
                  src={item.imageURL}
                  alt={`Photo by ${item.fullName}`}
                />
                <GalleryCard.Footer>
                  <GalleryCard.Details
                    avatarURL={item.avatarURL}
                    fullName={item.fullName}
                    dateString={item.dateString}
                  />
                  <GalleryCard.IconGroup>
                    <GalleryCard.IconItem name="eye" label={item.totalView} />
                    <GalleryCard.IconItem
                      name="heart"
                      label={item.totalLike}
                      right
                    />
                  </GalleryCard.IconGroup>
                </GalleryCard.Footer>
              </GalleryCard>
            </Grid.Col>
          ))}
        </Grid.Row>
      </Page.Content>
    </SiteWrapper>
  );
}
1210129
def group_items_html(grouped_items, options = {})
      default_opts  = {
          :group_nr_cols =>3,
          :item_nr_cols  => 1,
          :css_begin     => 'span-24 last',
          :render        => proc { |item| "<b>#{item.to_s}</b>" }
      }
      options       = default_opts.merge(options)
      title         = options[:title]
      group_nr_cols = options[:group_nr_cols]
      item_nr_cols  = options[:item_nr_cols]
      css_begin     = options[:css_begin]
      render        = options[:render]

      html          = ""
      html << "<h2>#{title}</h2>" if title
      grouped_items.each_with_index do |items_with_headers, items_box_index|
        headers = items_with_headers[0]
        items   = items_with_headers[1]
        html << "<div class='#{css_begin}'>" if (items_box_index % group_nr_cols) == 0
        if (items_box_index % group_nr_cols) == (group_nr_cols - 1)
          html << "<div class='span-8 last'>"
        else
          html << "<div class='span-8'>"
        end

        html << "<h2>"
        html << headers.first.to_s
        html << "- #{headers.last}" if headers.length > 1
        html << "</h2>"

        items.each_with_index do |item, index|
          if (index % (items.length / item_nr_cols + 1)) == 0
            html << "<div class='span-6#{index == ((items.length / item_nr_cols + 1) * (item_nr_cols-1)) ? "last" : ""}'/><ul>"
          end

          html << "<li>"
          html << render.call(item)
          html << "</li>"

          if (index % (items.length / item_nr_cols + 1)) == ((items.length / item_nr_cols + 1) -1)
            html << "</ul></div>"
          end
        end
        html << "</ul></div>" if ((items.length-1) % (items.length / item_nr_cols + 1)) != ((items.length / item_nr_cols + 1) -1)
        html << "</div>"
        html << "</div>" if (items_box_index % group_nr_cols) == (group_nr_cols - 1)
      end

      html
    end
1328410
public function renderComponent()
    {
        $name = array_pop($this->componentStack);

        return $this->render($name, $this->componentData($name));
    }
942830
function renderItems(items) {
    var filesContainer = document.getElementById('files');
    items.forEach(function (item) {
        var li = document.createElement('li');
        li.innerHTML = item.name;
        filesContainer.appendChild(li);
    });
}
231153
def render_layout(self, app, path, alias=None):
        """"""
        self.assign_routes(app)
        return ReactComponent(
            self.layout,
            self.src_file,
            self.component_id,
            props=self.build_props(),
            static_path=path,
            alias=alias)
259089
function render () {
  todosContainer.innerHTML = '<ul>' +
    todos.map(function (todo, index) {
      return '<li class="item">' +
        todo +
        ' <button class="remove-todo" data-index="' + index + '">X</button>' +
      '</li>'
    }).join('') +
  '</ul>'

  document.dispatchEvent(new Event('render-event'))
}
866923
function withTheme(WrappedComponent) {
  const displayName =
    WrappedComponent.displayName || WrappedComponent.name || 'Component'

  return class extends React.Component {
    static displayName = `withTheme(${displayName})`

    render() {
      return (
        <ThemeConsumer>
          {theme => <WrappedComponent theme={theme} {...this.props} />}
        </ThemeConsumer>
      )
    }
  }
}