<commit_before>import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { UIRouter, UIRouterReact, UIView, UISrefActive, UISref, ReactStateDeclaration, trace, pushStateLocationPlugin } from '../src/index';

import {Home} from './home';
import {Child} from './child';
import {Nest} from './nest';
import {Header} from './header';

let home = { name: 'home', component: Home, url: '/home?foo' };
let child = { name: 'home.child', component: Child, url: '/child' };
let nest = {
  name: 'home.child.nest',
  views: {
    $default: Nest,
    "header@home": Header
  },
  url: '/nest',
  resolve: [{
    token: 'foo',
    resolveFn: ($transition$) => {
      return new Promise<string>((resolve, reject) => {
        setTimeout(() => {
          resolve('bar');
        }, 1000);
      });
    }
  }]
} as ReactStateDeclaration;


const routerConfig = (router: UIRouterReact) => {
  router.urlRouter.otherwise("/home");
  trace.enable(1);
}

let el = document.getElementById("react-app");
let app = (
  <UIRouter plugins={[pushStateLocationPlugin]} states={[home, child, nest]} config={routerConfig}>
    <div>
      <UISrefActive class="active">
        <UISref to="home"><a>Home</a></UISref>
      </UISrefActive>
      <UIView><p>Content will load here</p></UIView>
    </div>
  </UIRouter>
);
ReactDOM.render(app, el);<commit_msg>chore(example): add render prop usage<commit_after>import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { UIRouter, UIRouterReact, UIView, UISrefActive, UISref, ReactStateDeclaration, trace, pushStateLocationPlugin } from '../src/index';

import {Home} from './home';
import {Child} from './child';
import {Nest} from './nest';
import {Header} from './header';

let home:ReactStateDeclaration = { name: 'home', component: Home, url: '/home?foo' };
let child:ReactStateDeclaration = { name: 'home.child', component: Child, url: '/child' };
let nest:ReactStateDeclaration = {
  name: 'home.child.nest',
  views: {
    $default: Nest,
    "header@home": Header
  },
  url: '/nest',
  resolve: [{
    token: 'foo',
    resolveFn: ($transition$) => {
      return new Promise<string>((resolve, reject) => {
        setTimeout(() => {
          resolve('bar');
        }, 1000);
      });
    }
  }]
};


const routerConfig = (router: UIRouterReact) => {
  router.urlRouter.otherwise("/home");
  trace.enable(1);
}

let el = document.getElementById("react-app");
let app = (
  <UIRouter plugins={[pushStateLocationPlugin]} states={[home, child, nest]} config={routerConfig}>
    <div>
      <UISrefActive class="active">
        <UISref to="home"><a>Home</a></UISref>
      </UISrefActive>
      <UIView render={(Comp, props) => <Comp {...props} foo="bar" />}><p>Content will load here</p></UIView>
    </div>
  </UIRouter>
);
ReactDOM.render(app, el);
{'fraction_non_alphanumeric': 0.18610421836228289, 'fraction_numerical': 0.003544842254519674, 'mean_word_length': 3.719063545150502, 'pattern_counts': {'":': 2, '<': 34, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1948353', 'n_tokens_mistral': 932, 'n_tokens_neox': 920, 'n_words': 225}