Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.0.0-rc.2] onRest and fn for useTransition states does not work #1000

Closed
zenios opened this issue May 11, 2020 · 2 comments
Closed

[9.0.0-rc.2] onRest and fn for useTransition states does not work #1000

zenios opened this issue May 11, 2020 · 2 comments
Labels
kind: bug Something isn't working
Milestone

Comments

@zenios
Copy link

zenios commented May 11, 2020

onRest in the following example is never called

const transition = useTransition(isOpen, {
    from: {
      opacity: 0,
    },
    enter: (active) => {
      return {
        opacity: 1,
        onRest: () => {
          console.log("Enter completed");
        },
      };
    },
    leave: {
      opacity: 0,
    },
  });

In these one it works

const transition = useTransition(isOpen, {
    from: {
      opacity: 0,
      onRest: () => {
        console.log("Hello 1");
      },
    },
    enter: {
      opacity: 1,
      onRest: () => {
        console.log("Enter completed")
      },
    },
    leave: {
      opacity: 0,
    },
  });
@aleclarson
Copy link
Contributor

@aleclarson aleclarson added kind: bug Something isn't working v9 labels May 11, 2020
@aleclarson aleclarson added this to the v9.0.0 milestone May 11, 2020
aleclarson added a commit that referenced this issue May 11, 2020
This affects `update` and `leave` too.

Closes #1000
aleclarson added a commit that referenced this issue May 11, 2020
This affects `update` and `leave` too.

Closes #1000
@aleclarson
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants