Comments (5)
I don't think there's necessarily a problem with the word "pathname", it helps to tangibly tie it to react-router, this is made for "route" transitions after all, I think "key" is just further abstract.
from react-router-transition.
What about "route"? "Pathname" kind of implies the whole path, as well as it having the same name as the property that holds the whole path, where "route" isn't necessarily the entire path. That along with readme changes I think would really help clarify things.
from react-router-transition.
How bad would it be to just have a v4 specific <SwitchTransition>
component that handles mapping the active path to the animating route? Seems like in many of the cases, exposing the wiring would be unnecessary. Too closely bound?
aka:
<Route render={({location, history, match}) => (
<SwitchTransition
location={location}
key={location.key}
atEnter={{ opacity: 0 }}
atLeave={{ opacity: 0 }}
atActive={{ opacity: 1 }}
>
<Route exact path="/" component={Home} />
<Route exact path="/about/" component={About}/>
</SwitchTransition>
)} />
from react-router-transition.
Derp, just saw the date on this.
from react-router-transition.
from react-router-transition.
Related Issues (20)
- Very first transition is a bit buggy, after that it's smooth HOT 1
- Slide animation HOT 1
- AnimatedSwitch throws error if maximum update depth is exceeded within a HOC HOT 2
- componentWillReceiveProps is going to be deprecated HOT 5
- Transition works on the first time, but Component goes missing on the second time. HOT 2
- Attempted import error: 'useLocation' is not exported from 'react-router-dom' HOT 8
- Tests failing with error: SyntaxError: Cannot use import statement outside a module after upgrading to 2.0.0 HOT 5
- Transitioning between dynamic routes
- Entering Component not animated
- support v6 HOT 1
- Is there a way for a transitioned component to know about it?
- Warning: componentWillReceiveProps HOT 2
- Update to React version 17.X? HOT 3
- Is there any way to add/remove classes `atEnter`, `atLeave`, and `atActive`? HOT 1
- Support "prefers-reduced-motion"
- Transition duration missing? HOT 1
- Notifying transitioned component that transition has started (instead of ComponentWillUnmount)
- Source or example of example site transitions HOT 1
- Attempted import error: 'Switch' is not exported from 'react-router-dom' HOT 2
- use in React-routerV6 , error: `Uncaught TypeError: pathname.match is not a function`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-router-transition.