-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TextInput: Minimize Allocation of Imperative Functions
Summary: While refactoring `TextInput`, I noticed that we are allocating each of the exported imperative instance methods on every invocation of the component. This is wasteful because if the `ref` does not change, this just creates more garbage. Instead, we only need to allocate them when we are actually going to assign them onto a `ref`. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D41191440 fbshipit-source-id: 0120d67a9e29a3e0c3f42c3fa436381d6bec7619
- Loading branch information
1 parent
9329121
commit 7bcc6f9
Showing
1 changed file
with
60 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters