Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use setState for disabled KeyboardAvoidingView to avoid re-rend…
…ers (#38074) Summary: There are two reasons to apply these changes: - We don't need to re-render the `KeyboardAvoidingView` if it is disabled. It may be especially useful in combination with [react-navigation](https://reactnavigation.org/) where we could disable `KeyboardAvoidingView` for screens that are not focused - They fix the problem with the `KeyboardAvoidingView` wrapped inside the [react-freeze](https://github.com/software-mansion/react-freeze) component. Similarly, as above, it is useful when we want to freeze screens that are not visible for the user. ## Changelog: [GENERAL] [CHANGED] Don't use setState for disabled KeyboardAvoidingView to avoid re-renders <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: #38074 Test Plan: - Check if the KeyboardAvoidingView works as expected. Reviewed By: sammy-SC Differential Revision: D49148391 Pulled By: blakef fbshipit-source-id: c4b7bde696d2249cbf4ad12c77058183b632464d
- Loading branch information