This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reset pages promises after transitions when using the new trigge…
…r prop
- Loading branch information
Tyler Barnes
committed
Mar 27, 2019
1 parent
9d69a8e
commit 6654337
Showing
3 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export default function getPagesPromises() { | ||
let exitResolve; | ||
const exitPromise = new Promise(resolve => { | ||
exitResolve = resolve; | ||
}); | ||
|
||
let entryResolve; | ||
const entryPromise = new Promise(resolve => { | ||
entryResolve = resolve; | ||
}); | ||
|
||
return { | ||
triggerResolve: { | ||
entry: entryResolve, | ||
exit: exitResolve | ||
}, | ||
pages: { | ||
exit: exitPromise, | ||
entry: entryPromise | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters