https://github.com/fakundo/react-router-transition-group
https://github.com/fakundo/react-router-transition-group
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fakundo/react-router-transition-group
- Owner: fakundo
- Created: 2018-04-01T14:58:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-28T13:57:12.000Z (over 7 years ago)
- Last Synced: 2025-02-25T19:47:15.246Z (over 1 year ago)
- Language: JavaScript
- Size: 370 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-router-transition-group
[](https://www.npmjs.com/package/react-router-transition-group)
Transitions for react-router.
## Installation
```
npm install react-router-transition-group
```
## Demo
[Demo](https://fakundo.github.io/react-router-transition-group/)
/
[Source](https://github.com/fakundo/react-router-transition-group/tree/master/examples)
## Usage
- Add `transition` property to `Switch` component
- You also can override `transition` for each `Route` component
- `transition` is a Transition component from `react-transition-group`
- To disable transitions between some routes, you can group them by passing the same `transitionKey` property to `Route` component
```javascript
import React from 'react'
import { Route } from 'react-router-dom'
import { Switch } from 'react-router-transition-group'
import MyTransition from 'components/MyTransition'
import HomePage from 'components/HomePage'
import NotFoundPage from 'components/NotFoundPage'
export default () => (
)
```