Skip to content

[bug]: Promise returned by Controller.start is not resolved consistently #2208

Description

@yifeiyin

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.7.3

What's Wrong?

await controller.start({ ... }) is not being resolved consistently. And the behaviour the consistently dependent on the animated value.

To Reproduce

  1. Open the codesandbox console
  2. click add 3 times
  3. click on the top left element to trigger removal
  4. click on the top element to trigger removal
  5. notice that the Finished awaiting never gets printed
  6. Go to line 74. Comment line 74. Uncomment line 76
  7. Reload page. Repeat 1-4. Notice that the finished awaiting gets printed

Expected Behaviour

Promise is always resolved immediately after animation completes.

Link to repo

https://codesandbox.io/s/react-spring-reproduce-s7jvwv

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions