Package Exports
- react-router-transition-page
- react-router-transition-page/build/bundle.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-router-transition-page) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
描述
基于 react 的路由切换左右滑动动画
效果如图
安装
npm install react-router-transition-page --save
引入方式
import { ReactRouterTransitionPage } from 'react-router-transition-page'; // 项目没有用TS,可以这样引入;
const { ReactRouterTransitionPage } = require('react-router-transition-page'); // 项目中使用了TS,可以这样引入;
使用方法
return (
<ReactRouterTransitionPage
path={route.path} // 指的是pathname,格式为如:'/login'
component={route.component} // route.component 是匹配到的组件;
/>
);