rmkj-router
v0.0.3
Published
import React, { Component } from 'react'; import axios from 'axios'; import { RootRoute, ConnectRouter, CERTTYPE } from 'rmkj-router'; import routers from './router'; import store from './store';
Downloads
3
Readme
import React, { Component } from 'react'; import axios from 'axios'; import { RootRoute, ConnectRouter, CERTTYPE } from 'rmkj-router'; import routers from './router'; import store from './store';
export default class Test extends Component { render() { const config = { async getUserInfo(token) { const ret = await axios.get('/api/index.json', { token }); return ret; }, certType: CERTTYPE.COOKIE, certName: 'userid', permissionsKey: 'authors', store, routers, }; return (
{ ConnectRouter(config)(RootRoute) }
</div>
);
} }