Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

next-page-transitions

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-page-transitions - npm Package Compare versions

Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2

29

lib/PageTransition.js

@@ -138,6 +138,5 @@ "use strict";

});
var children = props.children,
appear = props.appear;
var children = props.children;
_this.state = {
state: appear ? 'entered' : 'enter',
state: 'enter',
isIn: !shouldDelayEnter(children),

@@ -219,5 +218,13 @@ currentChildren: children,

this.setState({
showLoading: false
});
if (this.state.showLoading) {
// We'll hide the loader first and animate in the page on the next tick
this.setState({
showLoading: false
});
} else {
// We can immediately bring in the next page!
this.setState({
isIn: true
});
}
}

@@ -242,3 +249,2 @@ }, {

timeout = _props.timeout,
appear = _props.appear,
loadingComponent = _props.loadingComponent,

@@ -261,3 +267,3 @@ loadingCallbackName = _props.loadingCallbackName;

"in": this.state.isIn,
appear: appear,
appear: true,
onEnter: this.onEnter,

@@ -298,4 +304,3 @@ onEntering: this.onEntering,

classNames: _propTypes.default.string.isRequired,
timeout: _PropTypes.timeoutsShape,
appear: _propTypes.default.bool,
timeout: _PropTypes.timeoutsShape.isRequired,
loadingComponent: _propTypes.default.element,

@@ -330,9 +335,7 @@ loadingDelay: _propTypes.default.number,

PageTransition.defaultProps = {
timeout: 300,
loadingComponent: null,
loadingCallbackName: 'pageTransitionReadyToEnter',
loadingDelay: 500,
appear: true
loadingDelay: 500
};
var _default = PageTransition;
exports.default = _default;
{
"name": "next-page-transitions",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.2",
"description": "Simple and customizable page transitions for Next.js apps",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc