mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
20 lines
713 B
TypeScript
20 lines
713 B
TypeScript
import * as React from 'react';
|
|
import { Router, Route, HistoryBase } from 'react-router';
|
|
import { Layout } from './components/Layout';
|
|
import Home from './components/Home';
|
|
import FetchData from './components/FetchData';
|
|
import Counter from './components/Counter';
|
|
|
|
export default <Route component={ Layout }>
|
|
<Route path='/' components={{ body: Home }} />
|
|
<Route path='/counter' components={{ body: Counter }} />
|
|
<Route path='/fetchdata' components={{ body: FetchData }}>
|
|
<Route path='(:startDateIndex)' /> { /* Optional route segment that does not affect NavMenu highlighting */ }
|
|
</Route>
|
|
</Route>;
|
|
|
|
// Enable Hot Module Replacement (HMR)
|
|
if (module.hot) {
|
|
module.hot.accept();
|
|
}
|