-
Notifications
You must be signed in to change notification settings - Fork 38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't particularly like this because timeout
is in fact a required property for the underlying Transition
. I still want people to get prop type failures in development mode, even if they won't be validated in a production environment. I don't know that there's a particularly elegant solution to this; maybe something like
timeout: (props, ...args) => {
let pt = timeoutsShape
if (pt) {
pt = pt.isRequired
return pt(props, ...args)
}
}
src/PageTransition.js
Outdated
@@ -268,9 +268,10 @@ PageTransition.propTypes = { | |||
|
|||
PageTransition.defaultProps = { | |||
loadingComponent: null, | |||
loadingCallbackName: 'pageTransitionReadyToEnter', | |||
loadingCallbackName: 'pagesTransitionReadyToEnter', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this prop name changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is typo, will fix it soon
@nwalters512 This is the same solution for react-transition-group, I agree with you. |
property
Co-Authored-By: teleginzhenya <[email protected]>
Closing in favor of #21 - thanks for your work on this though! |
Resolves #17 and vercel/next.js#6086