Skip to content

[bug]: exitBeforeEnter in useTransition doesn't work when used with trail #1868

Description

@peeke

Which react-spring target are you using?

  • @react-spring/web
  • @react-spring/three
  • @react-spring/native
  • @react-spring/konva
  • @react-spring/zdog

What version of react-spring are you using?

9.4.2

What's Wrong?

When using useTransition with both the trail and exitBeforeEnter option set, the spring freezes after the leave transitions are done. When uncommenting either, it works.

To Reproduce

Provide useTransition with both a trail and a exitBeforeEnter option.

Checkout the code sandbox: https://codesandbox.io/s/6-loading-spinner-forked-edl8d3?file=/src/SplitWords.js

When clicking next, the words animate out, but never animate in. If you uncomment trail or exitBeforeEnter and refresh, it works.

Expected Behaviour

I would expect the words to animate out with a trail. When there are all animated out, I expect the enter transition of the updated words to start.

Link to repo

https://codesandbox.io/s/6-loading-spinner-forked-edl8d3?file=/src/SplitWords.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: corerelates to core classes // parts of the librarykind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions