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

Remove useLazyRef hook usage #18003

Merged
merged 2 commits into from
Jun 22, 2020
Merged

Remove useLazyRef hook usage #18003

merged 2 commits into from
Jun 22, 2020

Conversation

tassoevan
Copy link
Contributor

Proposed changes

Remove the only usage of the custom hook useLazyRef, as it can't become compatible with React's strict mode (our components must be future-proof to adhere to concurrent mode). Ref values can't be subjected to the rendering phase of React.

Issue(s)

How to test or reproduce

Wrap the EditableSettingsProvider component into React.StrictMode.

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Hotfix (a major bugfix that has to be merged asap)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Changelog

Further comments

@tassoevan tassoevan added this to the 3.4.0 milestone Jun 22, 2020
@tassoevan tassoevan requested a review from a team June 22, 2020 17:05
@sampaiodiego sampaiodiego changed the title Regression: useLazyRef usage Remove useLazyRef hook usage Jun 22, 2020
@sampaiodiego sampaiodiego merged commit f6828bb into develop Jun 22, 2020
@sampaiodiego sampaiodiego deleted the regression/use-lazy-ref branch June 22, 2020 18:30
gabriellsh added a commit that referenced this pull request Jun 22, 2020
…prune_discussions

* 'develop' of github.com:RocketChat/Rocket.Chat:
  Remove useLazyRef hook usage (#18003)
  [FIX] User is prompted to reset their password when logging in with OAuth provider (#18001)
  [FIX] Missing i18n key for setting: Verify Email for External Accounts (#18002)
  Regression: Cannot save avatar change on admin (#17999)
  [NEW][ENTERPRISE] Omnichannel multiple business hours (#17947)
  [FIX] New Omnichannel Past Chats list padding (#17994)
@sampaiodiego sampaiodiego mentioned this pull request Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants