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

Activation lifecycle bugs introduced in #19 #24

Closed
benoitgrelard opened this issue Oct 1, 2019 · 4 comments
Closed

Activation lifecycle bugs introduced in #19 #24

benoitgrelard opened this issue Oct 1, 2019 · 4 comments

Comments

@benoitgrelard
Copy link
Contributor

Hi @theKashey

Since #19 got merged and 3.1.1 got released, the activation lifecycle is not working properly.
I haven't managed to specifically find out why, but he's a simple reproduction:

react-focus-on 3.1.0

Working activation lifecycle
https://codesandbox.io/s/react-focus-on-310-wg4js

react-focus-on 3.1.1

Activation lifecycle not working correctly
https://codesandbox.io/s/react-focus-on-311-3rz2r


Both examples are exactly the same, only the version of react-focus-on differs.
Pay attention to the logs:

  • in 3.1.0 when opening you get activated, and when closing you get deactivated
  • in 3.1.1 when opening you get deactivated and activated, and when closing you get nothing

This is a breaking issue for us and I believe we should rollback that PR (#19) until we can figure out a way to incorporate the intended fix (#17) without breaking the lifecycle.

Let me know what you think!

✌️

@theKashey
Copy link
Owner

Yeah, hooks are not always great...

@theKashey
Copy link
Owner

theKashey commented Oct 1, 2019

Fixed, try 3.1.3

@benoitgrelard
Copy link
Contributor Author

Works great, thanks!

@theKashey
Copy link
Owner

You are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants