import React from 'react'
import { render } from 'react-dom'
import { Router, Route, IndexRoute, Link, IndexLink, browserHistory } from 'react-router'
import withExampleBasename from '../withExampleBasename'
const ACTIVE = { color: 'red' }
//*************** React 中可以直接这么写? ********************
const App = ({ children }) => (
<div>
<h1>APP!</h1>
<ul>
<li><Link to="/" activeStyle={ACTIVE}>/</Link></li>
<li><IndexLink to="/" activeStyle={ACTIVE}>/ IndexLink</IndexLink></li>
<li><Link to="/users" activeStyle={ACTIVE}>/users</Link></li>
<li><IndexLink to="/users" activeStyle={ACTIVE}>/users IndexLink</IndexLink></li>
<li><Link to="/users/ryan" activeStyle={ACTIVE}>/users/ryan</Link></li>
<li><Link to={{ pathname: '/users/ryan', query: { foo: 'bar' } }}
activeStyle={ACTIVE}>/users/ryan?foo=bar</Link></li>
<li><Link to="/about" activeStyle={ACTIVE}>/about</Link></li>
</ul>
{children}
</div>
)
Stateless Function
文档地址:Stateless Function