Skip to content

Instantly share code, notes, and snippets.

@adnaan
Created November 2, 2016 05:00
Show Gist options
  • Save adnaan/ff82ac4445d777b11595d8f228929cde to your computer and use it in GitHub Desktop.
Save adnaan/ff82ac4445d777b11595d8f228929cde to your computer and use it in GitHub Desktop.
src/index.js
/*@flow*/
import React from 'react';
import { Router, Route } from 'dva/router';
import dva from 'dva';
import App from './App';
import model from './model';
import './index.css';
const app = dva();
app.model(model);
app.router(({ history }) =>
<Router history={history}>
<Route path="/" component={App} />
</Router>
);
app.start('#root');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment