react-router-helper
提供中心化路由跳转函数
// index.js// Use history wrap by react-router-helper in you app;; ReactDOM;
// routes.js// Use history wrap by react-router-helper; { history;}
// Use goDetail anywhere;; { return <div> <h1 onClick= >react router helper demo</h1> </div> }
引入简单中间价机制增强跳转的功能
登录验证
; // enhanceconst isLogin = true;const goLogin = ;const loginRequired = to null if ! console; ; else ; console; ; // use loginRequiredconst createDetailPath = `/detail/`;const goDetail =