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

useResponsiveValue: Fires a side effect on dependency change #327

Merged

Conversation

hallaji
Copy link
Contributor

@hallaji hallaji commented Jul 8, 2020

The useResponsiveValue hook does not update the value if one of the dependencies changes.
Internationalisation is a good example for this situation.

Changes

  • Adds a side effect for hook useResponsiveValue

Issues

Release version

  • internal (no release required)
  • patch (bug fixes)
  • minor (backward-compatible changes)
  • major (backward-incompatible, breaking changes)

Contributor's checklist

  • My branch is up-to-date with the latest master
  • I ran yarn verify to see the build and tests pass

@hallaji hallaji marked this pull request as ready for review July 8, 2020 23:05
@hallaji
Copy link
Contributor Author

hallaji commented Jul 10, 2020

@kettanaito Hey Artem, Are you accepting pull requests on this repo?

@kettanaito
Copy link
Owner

Hey, @hallaji! Thank you for preparing this. I've been busy, so I overlooked this one, my bad.

The useResponsiveValue hook does not update the value if one of the dependencies changes.
Internationalisation is a good example for this situation.
@kettanaito kettanaito force-pushed the 326-use-responsive-value-side-effect branch from bd960be to d3a439d Compare August 4, 2020 08:57
@kettanaito
Copy link
Owner

I've updated your feature branch against the latest master. The changes look good to me, let's wait for the CI.

Copy link
Owner

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes! Welcome to contributors 🎉

@kettanaito kettanaito merged commit 353843f into kettanaito:master Aug 4, 2020
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

Successfully merging this pull request may close these issues.

useResponsiveValue might require to fire an effect for a dependency change
2 participants