Skip to content

Commit

Permalink
Update adding-page-transitions-with-plugin-transition-link.md (#25456)
Browse files Browse the repository at this point in the history
'enter' is not given to TransitionState as a prop, it should be 'entry', to match the format of the TransitionLink component. It took an embarrassingly long time for me to work out why TransitionState wasn't working to realise this.
  • Loading branch information
Olipear committed Jul 9, 2020
1 parent 124aced commit acce507
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -97,7 +97,7 @@ You can specify a `trigger` function that will handle the animation. This is use
### Using passed props
The exiting and entering pages/templates involved in the transition will receive props indicating the current transition status, as well as the `exit` or `enter` props defined on the `TransitionLink`.
The exiting and entering pages/templates involved in the transition will receive props indicating the current transition status, as well as the `exit` or `entry` props defined on the `TransitionLink`.
```jsx
const PageOrTemplate = ({ children, transitionStatus, entry, exit }) => {
Expand All @@ -121,10 +121,10 @@ const Box = posed.div({
})

<TransitionState>
{({ transitionStatus, exit, enter, mount }) => {
{({ transitionStatus, exit, entry, mount }) => {
console.log("current page's transition status is", transitionStatus)
console.log("exit object is", exit)
console.log("enter object is", enter)
console.log("entry object is", entry)

return (
<Box
Expand Down

0 comments on commit acce507

Please sign in to comment.